Coder Social home page Coder Social logo

yolo-tf2's Introduction

YOLOv3 implementation in Tensorflow 2

An elegant Yolov3 implementation in Tensorflow 2.0.

prediction

What you need to know

This repo is heavily borrowed from awesome repo zzh8829. I just want to make it work on COCO 2017 dataset.

Installation

Clone the repo to your local

git clone https://github.com/tamnguyenvan/yolo-tf2

Install the requirements

pip install -r requirements.txt

Download yolov3 darknet weights and convert to tensorflow format

wget https://pjreddie.com/media/files/yolov3.weights -O data/yolov3.weights
python convert.py --weights ./yolov3.weights --output ./checkpoints/yolov3.tf

Usage

This is the time to enjoy. Let's detect some images!

python test.py --image_path /path/to/image --model_path ./checkpoints/yolov3.tf

Training

We also provide a pipeline for training the model on COCO 2017 dataset. Download COCO 2017 dataset, extract and put them into data/raw directory.

wget http://images.cocodataset.org/zips/train2017.zip
wget http://images.cocodataset.org/zips/val2017.zip
wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip

Create tfrecord files for training pipeline

python tools/create_tfrecords.py --data_dir ../data/raw --split train --output_file coco2017_train.tfrecord
python tools/create_tfrecords.py --data_dir ../data/raw --split val --output_file coco2017_val.tfrecord

The 2 tfrecord files should be generated in data/processed directory. If everything is done, let's train the model

python train.py \
	--train_file ./data/processed/coco2017_train.tfrecord \
	--val_file ./data/processed/coco2017_val.tfrecord \
	--batch_size 8 \
	--epochs 20 \
	--lr 0.001

References

This repo is heavily inspired by zzh8829. Don't forget to give him a star.

yolo-tf2's People

Contributors

tamnguyenvan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mstk2014

yolo-tf2's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.