Skip to content

Commit

Permalink
much needed update of readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
HaydenFaulkner committed Nov 4, 2019
1 parent 3d65d26 commit 4acd3ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 74 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,40 +87,37 @@ conda activate viddet-mx
### Training
To train a model you can use something like:
```
python train_yolov3.py --dataset voc --gpus 0,1,2,3 --save_prefix 0001 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
python train_yolov3.py --dataset voc --gpus 0,1,2,3 --save_prefix 0001 --warmup_epochs 3 --syncbn
```

If you don't have this much power available you will need to specify a lower batch size:
If you don't have this much power available you will need to specify a lower batch size (this also will default to one GPU):
```
python train_yolov3.py --batch_size 4 --dataset voc --save_prefix 0001 --warmup_lr 0.0001 --warmup_epochs 3
python train_yolov3.py --batch_size 4 --dataset voc --save_prefix 0001 --warmup_epochs 3
```

Using MobileNet1.0 `--network mobilenet1.0` and batch size of 16
`--batch_size 16` for `voc` uses **9GB** of GPU memory

***We found a warmup was necessary for YOLOv3***

### Finetuning
To finetune a model you need to specify a `--resume` path to a
pretrained params model file and specify the `--trained_on` dataset,
the model will be finetuned on the dataset specified with `--dataset`
```
python train_yolov3.py --dataset voc --trained_on coco --resume models/0003/yolo3_darknet53_coco_best.params --gpus 0,1,2,3 --save_prefix 0006 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
python train_yolov3.py --dataset voc --trained_on coco --resume models/experiments/0003/yolo3_darknet53_coco_best.params --gpus 0,1,2,3 --save_prefix 0006 --warmup_epochs 3 --syncbn
```

### Detection, Testing & Visualisation
To evaluate a model you can use something like:
```
python detect_yolov3.py --batch_size 1 --model_path models/0001/yolo3_darknet53_voc_best.params --metrics voc --dataset voc --save_prefix 0001
python detect_yolov3.py --batch_size 1 --model_path models/experiments/0001/yolo3_darknet53_voc_best.params --metrics voc --dataset voc --save_prefix 0001
```

You can also evaluate on different data than the model was trained on
(voc trained model on vid set):
```
python detect_yolov3.py --trained_on voc --batch_size 1 --model_path models/0001/yolo3_darknet53_voc_best.params --metrics voc,coco,vid --dataset vid --save_prefix 0001
python detect_yolov3.py --trained_on voc --batch_size 1 --model_path models/experiments/0001/yolo3_darknet53_voc_best.params --metrics voc,coco,vid --dataset vid --save_prefix 0001
```

Visualisation is **off** by default use `--visualise True` to write out images with boxes displayed.
Visualisation is **off** by default add `--visualise` to write out images with boxes displayed.

## Results

Expand Down
68 changes: 4 additions & 64 deletions models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,6 @@ Trained on [MSCoco](http://cocodataset.org/#download) `train 17`

`yolo3_darknet53_coco`

#### GCV3 (0006 Alternative)
[**Download**](http://hf.id.au/models/VidDet/GCV3.tar.gz)

Uses MobileNet1.0 instead of DarkNet53

Trained on [PascalVOC](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit) `trainval 07+12`

`yolo3_mobilenet1.0_voc`

#### GCV4 (0008 Alternative)
[**Download**](http://hf.id.au/models/VidDet/GCV4.tar.gz)

Uses MobileNet1.0 instead of DarkNet53

Trained on [MSCoco](http://cocodataset.org/#download) `train 17`

`yolo3_mobilenet1.0_coco`


## Our Models
Our models, log files, and evaluation results are available for download
Expand All @@ -64,23 +46,23 @@ by clicking on each model ID below.
Trained on [PascalVOC](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit) `trainval 07+12`

```
python train_yolov3.py --dataset voc --gpus 0,1,2,3 --save_prefix 0001 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
python train_yolov3.py --dataset voc --gpus 0,1,2,3 --save_prefix 0001 --num_workers 16 --warmup_epochs 4 --syncbn
```
#### 0002
[**Download (SOON)**]()

Trained on [ImageNetDET](http://image-net.org/challenges/LSVRC/2017/download-images-1p39.php) `train_nonempty`

```
python train_yolov3.py --dataset det --gpus 0,1,2,3 --save_prefix 0002 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
python train_yolov3.py --dataset det --gpus 0,1,2,3 --save_prefix 0002 --num_workers 16 --warmup_epochs 3 --epochs 140 --lr_decay_epoch 100,120 --syncbn
```
#### 0003
[**Download**](http://hf.id.au/models/VidDet/0003.tar.gz)

Trained on [MSCoco](http://cocodataset.org/#download) `train 17`

```
python train_yolov3.py --dataset coco --gpus 0,1,2,3 --save_prefix 0003 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
python train_yolov3.py --dataset coco --gpus 0,1,2,3 --save_prefix 0003 --num_workers 16 --warmup_epochs 3 --epochs 280 --lr_decay_epoch2 20,250 --syncbn
```

#### 0004
Expand All @@ -89,50 +71,9 @@ python train_yolov3.py --dataset coco --gpus 0,1,2,3 --save_prefix 0003 --num_wo
Trained on [ImageNetVID](http://bvisionweb1.cs.unc.edu/ILSVRC2017/download-videos-1p39.php) `train17_ne_0.04`

```
python train_yolov3.py --dataset vid --gpus 0,1,2,3 --save_prefix 0004 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn --every 25
```

#### 0006
[**Download**](http://hf.id.au/models/VidDet/0006.tar.gz)

Uses MobileNet1.0 instead of DarkNet53

Trained on [PascalVOC](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit) `trainval 07+12`

```
python train_yolov3.py --network mobilenet1.0 --dataset voc --gpus 0,1,2,3 --save_prefix 0001 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
```
#### 0007
[**Download (SOON)**]()

Uses MobileNet1.0 instead of DarkNet53

Trained on [ImageNetDET](http://image-net.org/challenges/LSVRC/2017/download-images-1p39.php) `train_nonempty`

```
python train_yolov3.py --network mobilenet1.0 --dataset det --gpus 0,1,2,3 --save_prefix 0002 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
python train_yolov3.py --dataset vid --gpus 0,1,2,3 --save_prefix 0004 --num_workers 16 --warmup_epochs 3 --epochs 280 --lr_decay_epoch 220,250 --every 25 --syncbn
```
#### 0008
[**Download (SOON)**]()

Uses MobileNet1.0 instead of DarkNet53

Trained on [MSCoco](http://cocodataset.org/#download) `train 17`

```
python train_yolov3.py --network mobilenet1.0 --dataset coco --gpus 0,1,2,3 --save_prefix 0003 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn
```

#### 0009
[**Download (SOON)**]()

Uses MobileNet1.0 instead of DarkNet53

Trained on [ImageNetVID](http://bvisionweb1.cs.unc.edu/ILSVRC2017/download-videos-1p39.php) `train17_ne_0.04`

```
python train_yolov3.py --network mobilenet1_0 --dataset vid --gpus 0,1,2,3 --save_prefix 0004 --num_workers 16 --warmup_lr 0.0001 --warmup_epochs 3 --syncbn --every 25
```

## Results
Evaluated with `voc` and `coco` metrics. Box Area's - **S**mall `<32`,
Expand All @@ -142,7 +83,6 @@ Evaluated with `voc` and `coco` metrics. Box Area's - **S**mall `<32`,
|--------|------------|-----------|------------------|---------------------|-----------|------------------|----------------|----------------|----------------|
| `0001` | VOC `trainval 07+12` | VOC `test 07` | .835 | .463 | .733 | .510 | .118 | .317 | .559 |
| `GCV1` | VOC `trainval 07+12` | VOC `test 07` | .836 | .462 | .735 | .500 | .113 | .304 | .564 |
| `0006` | VOC `trainval 07+12` | VOC `test 07` | .751 | .356 | .656 | .346 | .095 | .205 | .438 |
| `GCV3` | VOC `trainval 07+12` | VOC `test 07` | .779 | .396 | .677 | .418 | .104 | .245 | .486 |
| `0003` | COCO `train 17` | COCO `val 17` | .525 | .288 | .515 | .296 | .136 | .306 | .427 |
| `GCV2` | COCO `train 17` | COCO `val 17` | .579 | .360 | .571 | .387 | .173 | .387 | .522 |
Expand Down

0 comments on commit 4acd3ae

Please sign in to comment.