Skip to content

Commit aa724a5

Browse files
committed
Moved files to fit new tfmodels file structure
1 parent d445311 commit aa724a5

File tree

2 files changed

+235
-0
lines changed

2 files changed

+235
-0
lines changed

official/projects/yolo/README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
DISCLAIMER: this YOLO implementation is still under development. No support will
2+
be provided during the development phase.
3+
4+
# YOLO Object Detectors, You Only Look Once
5+
6+
[![Paper](http://img.shields.io/badge/Paper-arXiv.1804.02767-B3181B?logo=arXiv)](https://arxiv.org/abs/1804.02767)
7+
[![Paper](http://img.shields.io/badge/Paper-arXiv.2004.10934-B3181B?logo=arXiv)](https://arxiv.org/abs/2004.10934)
8+
9+
This repository is the unofficial implementation of the following papers.
10+
However, we spent painstaking hours ensuring that every aspect that we
11+
constructed was the exact same as the original paper and the original
12+
repository.
13+
14+
* YOLOv3: An Incremental Improvement: [YOLOv3: An Incremental Improvement](https://arxiv.org/abs/1804.02767)
15+
16+
* YOLOv4: Optimal Speed and Accuracy of Object Detection: [YOLOv4: Optimal Speed and Accuracy of Object Detection](https://arxiv.org/abs/2004.10934)
17+
18+
## Description
19+
20+
YOLO v1 the original implementation was released in 2015 providing a
21+
ground breaking algorithm that would quickly process images and locate objects
22+
in a single pass through the detector. The original implementation used a
23+
backbone derived from state of the art object classifiers of the time, like
24+
[GoogLeNet](https://arxiv.org/abs/1409.4842) and
25+
[VGG](https://arxiv.org/abs/1409.1556). More attention was given to the novel
26+
YOLO Detection head that allowed for Object Detection with a single pass of an
27+
image. Though limited, the network could predict up to 90 bounding boxes per
28+
image, and was tested for about 80 classes per box. Also, the model can only
29+
make predictions at one scale. These attributes caused YOLO v1 to be more
30+
limited and less versatile, so as the year passed, the Developers continued to
31+
update and develop this model.
32+
33+
YOLO v3 and v4 serve as the most up to date and capable versions of the YOLO
34+
network group. This model uses a custom backbone called Darknet53 that uses
35+
knowledge gained from the ResNet paper to improve its predictions. The new
36+
backbone also allows for objects to be detected at multiple scales. As for the
37+
new detection head, the model now predicts the bounding boxes using a set of
38+
anchor box priors (Anchor Boxes) as suggestions. Multiscale predictions in
39+
combination with Anchor boxes allow for the network to make up to 1000 object
40+
predictions on a single image. Finally, the new loss function forces the network
41+
to make better predictions by using Intersection Over Union (IOU) to inform the
42+
model's confidence rather than relying on the mean squared error for the entire
43+
output.
44+
45+
46+
## Authors
47+
48+
* Vishnu Samardh Banna ([@GitHub vishnubanna](https://github.com/vishnubanna))
49+
* Anirudh Vegesana ([@GitHub anivegesana](https://github.com/anivegesana))
50+
* Akhil Chinnakotla ([@GitHub The-Indian-Chinna](https://github.com/The-Indian-Chinna))
51+
* Tristan Yan ([@GitHub Tyan3001](https://github.com/Tyan3001))
52+
* Naveen Vivek ([@GitHub naveen-vivek](https://github.com/naveen-vivek))
53+
* Jacob Zietek ([@GitHub jacob-zietek](https://github.com/jacob-zietek))
54+
55+
## Table of Contents
56+
57+
* [Our Goal](#our-goal)
58+
* [Models in the library](#models-in-the-library)
59+
* [References](#references)
60+
61+
62+
## Our Goal
63+
64+
Our goal with this model conversion is to provide implementation of the Backbone
65+
and YOLO Head. We have built the model in such a way that the YOLO head could be
66+
connected to a new, more powerful backbone if a person chose to.
67+
68+
## Models in the library
69+
70+
| Object Detectors | AP | AP50 | Checkpoint Path |
71+
| :--------------: | :--------------: | :--------------: | :--------------: |
72+
| Yolo-v3 | |
73+
| Yolo-v3 tiny | |
74+
| Yolo-v3 spp | |
75+
| Yolo-v4 | |
76+
| Yolo-v4 tiny | 21.21 | 41.69 |
77+
| Yolo-v4 csp | |
78+
| Yolo-v4 large | |
79+
80+
| Classifiers |
81+
| :--------------: |
82+
| Darknet53 |
83+
| CSPDarknet53 |
84+
## Models Zoo
85+
86+
87+
## Requirements
88+
[![TensorFlow 2.6](https://img.shields.io/badge/TensorFlow-2.6-FF6F00?logo=tensorflow)](https://github.com/tensorflow/tensorflow/releases/tag/v2.6.0)
89+
[![Python 3.8](https://img.shields.io/badge/Python-3.8-3776AB)](https://www.python.org/downloads/release/python-380/)
90+
91+
92+
DISCLAIMER: this YOLO implementation is still under development. No support
93+
will be provided during the development phase.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# --experiment_type=yolo_darknet
2+
# 21.21 AP
3+
# 41.68 AP50
4+
# 19.12 AP75
5+
# 29.59 APl
6+
# 23.94 APm
7+
# 9.67 APs
8+
9+
runtime:
10+
distribution_strategy: 'tpu'
11+
mixed_precision_dtype: 'float32'
12+
task:
13+
smart_bias_lr: 0.0
14+
model:
15+
darknet_based_model: True
16+
input_size: [416, 416, 3]
17+
backbone:
18+
type: 'darknet'
19+
darknet:
20+
model_id: 'cspdarknettiny'
21+
max_level: 5
22+
min_level: 4
23+
decoder:
24+
type: yolo_decoder
25+
yolo_decoder:
26+
version: v4
27+
type: tiny
28+
head:
29+
smart_bias: true
30+
detection_generator:
31+
box_type:
32+
'all': original
33+
scale_xy:
34+
'all': 1.05
35+
max_boxes: 300
36+
nms_type: iou
37+
iou_thresh: 0.001
38+
nms_thresh: 0.60
39+
loss:
40+
use_scaled_loss: False
41+
box_loss_type:
42+
'all': ciou
43+
ignore_thresh:
44+
'all': 0.7
45+
iou_normalizer:
46+
'all': 0.07
47+
cls_normalizer:
48+
'all': 1.0
49+
object_normalizer:
50+
'all': 1.0
51+
objectness_smooth:
52+
'all': 0.0
53+
max_delta:
54+
'all': .inf
55+
norm_activation:
56+
activation: leaky
57+
norm_epsilon: 0.00001
58+
norm_momentum: 0.99
59+
use_sync_bn: true
60+
num_classes: 80
61+
anchor_boxes:
62+
anchors_per_scale: 3
63+
boxes: [box: [10, 14], box: [23, 27], box: [37, 58],
64+
box: [81, 82], box: [135, 169], box: [344, 319]]
65+
train_data:
66+
prefetch_buffer_size: 32
67+
global_batch_size: 512
68+
dtype: float32
69+
input_path: 'gs://cam2-datasets/coco/train*'
70+
is_training: true
71+
drop_remainder: true
72+
seed: 1000
73+
parser:
74+
mosaic:
75+
mosaic_frequency: 0.0
76+
mixup_frequency: 0.0
77+
max_num_instances: 300
78+
letter_box: False
79+
random_flip: True
80+
aug_rand_saturation: 1.5
81+
aug_rand_brightness: 1.5
82+
aug_rand_hue: 0.1
83+
aug_scale_min: 0.50
84+
aug_scale_max: 1.5
85+
aug_rand_translate: 0.0
86+
jitter: 0.3
87+
area_thresh: 0.0
88+
random_pad: True
89+
use_tie_breaker: False
90+
best_match_only: False
91+
anchor_thresh: 1.0
92+
validation_data:
93+
prefetch_buffer_size: 32
94+
global_batch_size: 8
95+
dtype: float32
96+
input_path: 'gs://cam2-datasets/coco/val*'
97+
is_training: false
98+
drop_remainder: true
99+
parser:
100+
max_num_instances: 300
101+
letter_box: False
102+
use_tie_breaker: False
103+
best_match_only: False
104+
anchor_thresh: 1.0
105+
weight_decay: 0.000
106+
init_checkpoint: null
107+
init_checkpoint_modules: null
108+
annotation_file: null
109+
trainer:
110+
best_checkpoint_eval_metric: 'AP'
111+
best_checkpoint_export_subdir: 'best_ckpt'
112+
best_checkpoint_metric_comp: 'higher'
113+
train_steps: 553126
114+
validation_steps: 625
115+
steps_per_loop: 920
116+
summary_interval: 920
117+
validation_interval: 9200
118+
checkpoint_interval: 920
119+
optimizer_config:
120+
ema:
121+
average_decay: 0.9998
122+
trainable_weights_only: False
123+
dynamic_decay: True
124+
learning_rate:
125+
type: stepwise
126+
stepwise:
127+
boundaries: [442500, 497814]
128+
name: PiecewiseConstantDecay
129+
values: [0.04176, 0.004176, 0.0004176]
130+
optimizer:
131+
type: sgd_torch
132+
sgd_torch:
133+
momentum: 0.9
134+
momentum_start: 0.9
135+
nesterov: true
136+
warmup_steps: 2000
137+
weight_decay: 0.0005
138+
name: SGD
139+
warmup:
140+
type: 'linear'
141+
linear:
142+
warmup_steps: 2000

0 commit comments

Comments
 (0)