All Projects → jmpap → YOLOV2-Tensorflow-2.0

jmpap / YOLOV2-Tensorflow-2.0

Licence: MIT license
Just another YOLO V2 implementation. Train your own dataset in a jupyter notebook!

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to YOLOV2-Tensorflow-2.0

Decision Analysis Course
🎓 Uni-Bonn Decision Analysis graduate course, lectures and materials
Stars: ✭ 17 (-63.04%)
Mutual labels:  agriculture
Yolo-to-COCO-format-converter
Yolo to COCO annotation format converter
Stars: ✭ 176 (+282.61%)
Mutual labels:  yolo
yolor
implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
Stars: ✭ 1,867 (+3958.7%)
Mutual labels:  yolo
regen-ledger
Blockchain for planetary regeneration
Stars: ✭ 154 (+234.78%)
Mutual labels:  agriculture
CNN-models
YOLO-v2, ResNet-32, GoogLeNet-lite
Stars: ✭ 32 (-30.43%)
Mutual labels:  yolo
DeepParking
Find vacant parking spots in indoor and outdoor locations
Stars: ✭ 41 (-10.87%)
Mutual labels:  yolo
farmOS-map
farmOS Map is an OpenLayers wrapper library designed for agricultural mapping needs. It can be used in any project that has similar requirements.
Stars: ✭ 18 (-60.87%)
Mutual labels:  agriculture
DarkPlate
License plate parsing using Darknet and YOLO
Stars: ✭ 36 (-21.74%)
Mutual labels:  yolo
instance-segmentation
No description or website provided.
Stars: ✭ 40 (-13.04%)
Mutual labels:  yolo
TensorFlow-Raspberry-Pi
TensorFlow installation wheels for Raspberry Pi 32-bit OS
Stars: ✭ 18 (-60.87%)
Mutual labels:  tensorflow-2
openminder
Open Source Rootzone Monitoring
Stars: ✭ 24 (-47.83%)
Mutual labels:  agriculture
practical intro to tf2
Building an image classifier in TF2
Stars: ✭ 55 (+19.57%)
Mutual labels:  tensorflow-2
tensorflow-maml
TensorFlow 2.0 implementation of MAML.
Stars: ✭ 79 (+71.74%)
Mutual labels:  eager-execution
pytorch-psetae
PyTorch implementation of the model presented in "Satellite Image Time Series Classification with Pixel-Set Encoders and Temporal Self-Attention"
Stars: ✭ 117 (+154.35%)
Mutual labels:  agriculture
vehicle-detection
Detect vehicles in a video
Stars: ✭ 88 (+91.3%)
Mutual labels:  yolo
Eduponics-Mini
MicroPython MQTT & code example for Eduponics mini ESP32 learning kit
Stars: ✭ 41 (-10.87%)
Mutual labels:  agriculture
agro
AgrO describes agronomic practices, techniques, and variables used in agronomic experiments.
Stars: ✭ 39 (-15.22%)
Mutual labels:  agriculture
oasis-grow
Data collection, equipment control, and imaging engine for environmental IoT applications. Runs on RPi/ARM and interfaces with Arduino/ATmega minions over serial.
Stars: ✭ 53 (+15.22%)
Mutual labels:  agriculture
tennis-tracking
Open-source Monocular Python HawkEye for Tennis
Stars: ✭ 202 (+339.13%)
Mutual labels:  yolo
darknet-nnpack
Darknet with NNPACK
Stars: ✭ 302 (+556.52%)
Mutual labels:  yolo

YOLO V2 with TensorFlow 2.0

Here is a jupyter notebook featuring a complete implementation from scratch of YOLOV2 with TensorFlow 2.0 :

  • Dataset pipeline with data augmentation
  • Training from YOLO pretrained weights
  • Visualization of object detection

I use this notebook to train a model to detect crop and weeds in a field. The goal is to detect crop in real time for tractor guidance and to detect weeds to remove them.

Original paper : YOLO9000: Better, Faster, Stronger by Joseph Redmond and Ali Farhadi.

Files

  • Yolo_V2_tf_2.ipynb : Yolo V2 implementation with Tensorflow 2.0
  • Yolo_V2_tf_eager.ipynb : old notebook, Yolo V2 implementation with Tensorflow 1.x with eager execution

Requirements

  • tensorflow 2.0
  • imgaug
  • cv2

Before using the notebook

  • Download pretrained weights here. Place this weights file in notebook directory and name it yolo.weights
  • The training requires four directories containing images and annotations :

train_image_folder/ : contains images files used during training (png format)

train_annot_folder/ : contains annotations in PASCAL VOC format (one xml file for each image)

val_image_folder/ : contains images files used for validation

val_annot_folder/ : contains annotations in PASCAL VOC format

Using the notebook

  • Define object's labels to detect (same labels as defined in PASCAL VOC xml file). Example :
	LABELS           = ('sugarbeet', 'weed')
  • Define image size in dataset and YOLO grid size. Image size must be YOLO grid size * 32.
	IMAGE_H, IMAGE_W = 512, 512
	GRID_H,  GRID_W  = 16, 16 # GRID size = IMAGE size / 32
  • Define train batch size and validation batch size : depends on image size and video card RAM.
	TRAIN_BATCH_SIZE = 10
	VAL_BATCH_SIZE   = 10
  • Define path to dataset directories.
	# Train and validation directories

	train_image_folder = 'data/train/image/'
	train_annot_folder = 'data/train/annotation/'
	val_image_folder = 'data/val/image/'
	val_annot_folder = 'data/val/annotation/'

That's it, just run notebook cells to train YOLO on your own data!

Example of use

YOLO model trained on sugarbeet and weed dataset (two labels) :

Credits

Many thanks to these great repositories:

https://github.com/experiencor/keras-yolo2

https://github.com/allanzelener/YAD2K

and to this very good explanation of the YOLO V2 loss function:

https://fairyonice.github.io/Part_4_Object_Detection_with_Yolo_using_VOC_2012_data_loss.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].