Commit Graph

380 Commits (f1214f237dab515be92efeec890a66a8ab394dc5)

Author SHA1 Message Date
Glenn Jocher e77c77f580
Add check_requirements() (#1853)
* Add check_requirements()

* add import

* parameterize filename

* add to detect, test
2021-01-06 16:35:40 -08:00
Glenn Jocher 69be8e738f
YOLOv5 v4.0 Release (#1837)
* Update C3 module

* Update C3 module

* Update C3 module

* Update C3 module

* update

* update

* update

* update

* update

* update

* update

* update

* update

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* update

* update

* update

* update

* updates

* updates

* updates

* updates

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update datasets

* update

* update

* update

* update attempt_downlaod()

* merge

* merge

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* parameterize eps

* comments

* gs-multiple

* update

* max_nms implemented

* Create one_cycle() function

* update

* update

* update

* update

* update

* update

* update

* update study.png

* update study.png

* Update datasets.py
2021-01-04 19:54:09 -08:00
Glenn Jocher 0e341c5660
Create one_cycle() function (#1836) 2021-01-04 15:49:08 -08:00
Glenn Jocher 7180b22e2d
DDP Multi-GPU --resume bug fix (#1810) 2020-12-30 12:40:45 -08:00
Glenn Jocher 685d601308
Increase plot_labels() speed (#1736) 2020-12-18 18:05:38 -08:00
Glenn Jocher 7e161d9774
Single class train update (#1719) 2020-12-17 12:02:03 -08:00
Glenn Jocher c923fbff90
W&B artifacts feature addition (#1712)
* Log artifacts

* cleanup
2020-12-16 17:52:12 -08:00
Glenn Jocher 8bc0027afc
Update loss criteria constructor (#1711) 2020-12-16 08:39:35 -08:00
Glenn Jocher 7947c86b57
Update COCO train postprocessing (#1702) 2020-12-15 21:50:28 -08:00
Glenn Jocher 791dadb51c
Pycocotools best.pt after COCO train (#1616)
* Pycocotools best.pt after COCO train

* cleanup
2020-12-06 14:58:33 +01:00
Glenn Jocher b6ed1104a6
Daemon thread plotting (#1561)
* Daemon thread plotting

* remove process_batch

* plot after print
2020-11-30 16:44:14 +01:00
Glenn Jocher 9728e2b8ae
--image_weights bug fix (#1524) 2020-11-26 11:49:01 +01:00
Glenn Jocher bde5d9aaaa Update caching (#1496) 2020-11-24 16:23:00 +01:00
Glenn Jocher 0822cda781 Update caching (#1496) 2020-11-24 16:22:02 +01:00
Glenn Jocher 0a3ff71ae0
Confusion matrix (#1474)
* initial commit

* add plotting

* matrix to cpu

* bug fix

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* seaborn pandas to requirements.txt

* seaborn pandas to requirements.txt

* update wandb plotting

* remove pandas

* if plots

* if plots

* if plots

* if plots

* if plots

* initial commit

* add plotting

* matrix to cpu

* bug fix

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* seaborn pandas to requirements.txt

* seaborn pandas to requirements.txt

* update wandb plotting

* remove pandas

* if plots

* if plots

* if plots

* if plots

* if plots

* Cat apriori to autolabels

* cleanup
2020-11-23 15:27:14 +01:00
asim266 9ef4760b74
Rename precision_recall_curve.png bug fix (#1431)
* fix error in train.py line 400, changed precision-recall_curve.png to precision_recall_curve.png and fix error in test.py of {wandb.init() before wandb.log()} by importing wand and initializing it before wand.log()

* Update test.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-11-17 23:47:27 +01:00
Glenn Jocher 9c91aeae10
W&B logging add hyperparameters (#1399)
* W&B logging add hyperparameters

* hyp bug fix and image logging updates

* if plots and wandb:

* cleanup

* wandb/ gitignore add

* cleanup 2

* cleanup 3

* move wandb import to top of file

* wandb evolve

* update import

* wandb.run.finish()

* default anchors: 3
2020-11-16 13:35:34 +01:00
Glenn Jocher 0c26c4e831 Increase pycocotools robustness (#1396) 2020-11-14 13:53:58 +01:00
Glenn Jocher fe341fa44d
Utils reorganization (#1392)
* Utils reorganization

* Add new utils files

* cleanup

* simplify

* reduce datasets.py

* remove evolve.sh

* loadWebcam cleanup
2020-11-14 11:50:32 +01:00
Glenn Jocher 379396e896
Yaml constructor posixpath --resume bug fix (#1390)
* resume fix for yaml constructor posixpath error

* fix update

* remove weights/ dir backup
2020-11-13 19:03:02 +01:00
Glenn Jocher c4addd7761
Unified '/project/name' results saving (#1377)
* Project/name update

* Update ci-testing.yml

* address project with path separator failure mode

* Project/name update

* address project with path separator failure mode

* Update ci-testing.yml

* detect.py default --name bug fix

* missing rstrip PR

* train/exp0 to train/exp
2020-11-12 23:37:46 +01:00
Glenn Jocher ce3872f86c
W&B evolution bug fix (#1373) 2020-11-12 12:55:52 +01:00
Khiem Doan 1c8464e199
Use pathlib instead of low-level module (#1329)
* Use pathlib instead of low-level module

* Use pathlib instead of low-level module

* Update detect.py

* Update test.py

* reformat

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-11-10 13:01:19 +01:00
Glenn Jocher 4821d076e2
Increment train, test, detect runs/ (#1322)
* Increment train, test, detect runs/

* Update ci-testing.yml

* inference/images to data/images

* move images

* runs/exp to runs/train/exp

* update 'results saved to %s' str
2020-11-08 19:39:05 +01:00
Junghoon Kim 187f7c2ed1
Change optimizer parameters group method (#1239)
* Change optimizer parameters group method

* Add torch nn

* Change isinstance method(torch.Tensor to nn.Parameter)

* parameter freeze fix, PEP8 reformat

* freeze bug fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-11-02 00:08:36 +01:00
Ayush Chaurasia 96fcde40b8
W&B feature improvements (#1258)
* W&B feature improvements

This PR add:
* Class to id labels. Now, the caption of bounding boxes will display the class name and the class confidence score.
* The project name is set to "Yolov5" and the run name will be set to opt.logdir

* cleanup

* remove parenthesis on caption

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-11-01 20:54:29 +01:00
Ayush Chaurasia ca290dca24
Weights & Biases (W&B) Feature Addition (#1235)
* Add wandb metric logging and bounding box debugging

* Improve formatting, readability

* Remove mutliple path for init, improve formatting

* Add wandb params

* Remove typecasting in bbox coordinates and reformat

* Cleanup

* add wandb to requirements.txt

* minor updates to test.py

* general reorg

* reduce --log-imgs to 10

* clean wandb import

* reverse wandb import assert

* add except AssertionError to try import

* move wandb init to all global ranks

* replace print() with logger.info()

* replace print() with logger.info()

* move wandb.init() bug fix

* project PosixPath to basename bug fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-10-31 20:16:35 +01:00
Glenn Jocher 453acdec67 Update tensorboard logging 2020-10-26 01:08:33 +01:00
Jirka Borovec c67e72200e
fix compatibility for hyper config (#1146)
* fix/hyper

* Hyp giou check to train.py

* restore general.py

* train.py overwrite fix

* restore general.py and pep8 update

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-10-15 15:05:58 +02:00
Glenn Jocher 4d3680c81d
Minor import and spelling updates (#1133) 2020-10-13 17:24:27 +02:00
Jirka Borovec 00917a6225
update expt name comment and folder parsing for training (#978)
* comment

* fix parsing

* fix evolve

* folder

* tqdm

* Update train.py

* Update train.py

* reinstate anchors into meta dict

anchor evolution is working correctly now

* reinstate logger

prefer the single line readout for concise logging, which helps simplify notebook and tutorials etc.

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-10-13 14:10:21 +02:00
Glenn Jocher 0ada058f63
Generalized regression criterion renaming (#1120) 2020-10-11 17:25:17 +02:00
Glenn Jocher 5fac5ad165
Precision-Recall Curve Feature Addition (#1107)
* initial commit

* Update general.py

Indent update

* Update general.py

refactor duplicate code

* 200 dpi
2020-10-09 14:50:59 +02:00
Glenn Jocher 66676eb039 init_torch_seeds >> init_seeds bug fix 2020-10-06 15:00:47 +02:00
Glenn Jocher f1c63e2784 add mosaic and warmup to hyperparameters (#931) 2020-09-13 14:03:54 -07:00
Glenn Jocher a62a45b2dd prevent testloader caching on --notest 2020-09-11 16:59:13 -07:00
Glenn Jocher c8e51812a5 hyp evolution force-autoanchor fix 2020-09-04 13:13:10 -07:00
Glenn Jocher c687d5c129 reorganize train initialization steps 2020-09-04 12:25:53 -07:00
Glenn Jocher 44cdcc7e0b hyp['anchors'] evolution update 2020-09-03 12:54:22 -07:00
NanoCode012 d8274d0434
Fix results_file not renaming (#903) 2020-09-03 00:47:50 -07:00
Glenn Jocher 281d78c105
Update train.py (#902)
* Update train.py with simplified ckpt names

* Return default hyps to hyp.scratch.yaml

Leave line commented for future use once mystery of best finetuning hyps to apply becomes clearer.

* Force test_batch*_pred.jpg replot on final epoch

This will allow you to see predictions final testing run after training completes in runs/exp0
2020-09-02 15:08:43 -07:00
Naman Gupta 6f3db5e662
Remove autoanchor and class checks on resumed training (#889)
* Class frequency not calculated on resuming training

Calculation of class frequency is not needed when resuming training.
Anchors can still be recalculated whether resuming or not.

* Check rank for autoanchor

* Update train.py

no autoanchor checks on resume

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-09-02 09:05:31 -07:00
Glenn Jocher f06e2d518c opt.image_weights bug fix (#885) 2020-08-31 11:05:37 -07:00
Glenn Jocher 69ff781ca5 opt.img_weights bug fix (#885) 2020-08-31 10:33:07 -07:00
Glenn Jocher 08e97a2f88 Update hyperparameters to add lrf, anchors 2020-08-28 14:58:43 -07:00
Glenn Jocher a21bd0687c Update train.py forward simplification 2020-08-25 13:48:03 -07:00
Glenn Jocher 09402a2174 torch.from_tensor() bug fix 2020-08-25 03:14:17 -07:00
Glenn Jocher 83dc540b1d remove ema.ema hasattr(ema, 'module') check 2020-08-22 15:18:39 -07:00
Glenn Jocher 4447f4b937
--resume to same runs/exp directory (#765)
* initial commit

* add weight backup dir on resume
2020-08-20 18:24:33 -07:00
NanoCode012 fb4fc8cd02
Fix ema attribute error in DDP mode (#775)
* Fix ema error in DDP mode

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-08-18 09:52:21 -07:00
Glenn Jocher ebafd1ead5
single command --resume (#756)
* single command --resume

* else check files, remove TODO

* argparse.Namespace()

* tensorboard lr

* bug fix in get_latest_run()
2020-08-17 16:28:43 -07:00
Glenn Jocher 916d4aad9a
v3.0 Release (#725)
* initial commit

* remove yolov3-spp from test.py study

* update study --img range

* update mAP

* cleanup and speed updates

* update README plot
2020-08-13 14:25:05 -07:00
NanoCode012 0892c44bc4
Fix Logging (#719)
* Add logging setup

* Fix fusing layers message

* Fix logging does not have end

* Add logging

* Change logging to use logger

* Update yolo.py

I tried this in a cloned branch, and everything seems to work fine

* Update yolo.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-08-12 14:18:19 -07:00
Marc a925f283a7
max workers for dataloader (#722) 2020-08-12 13:57:36 -07:00
NanoCode012 4949401a94
Fix redundant outputs via Logging in DDP training (#500)
* Change print to logging

* Clean function set_logging

* Add line spacing

* Change leftover prints to log

* Fix scanning labels output

* Fix rank naming

* Change leftover print to logging

* Reorganized DDP variables

* Fix type error

* Make quotes consistent

* Fix spelling

* Clean function call

* Add line spacing

* Update datasets.py

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-08-11 11:18:45 -07:00
Glenn Jocher e71fd0ec0b Model freeze capability (#679) 2020-08-10 22:49:43 -07:00
Glenn Jocher 8e5c66579b update train.py remove save_json final_epoch 2020-08-09 21:24:40 -07:00
Glenn Jocher 41523e2c91
Dataset autodownload feature addition (#685)
* initial commit

* move download scripts into data/scripts

* new check_dataset() function in general.py

* move check_dataset() out of with context

* Update general.py

* DDP update

* Update general.py
2020-08-09 20:52:57 -07:00
NanoCode012 3d8ed0a76b
Fix missing model.stride in DP and DDP mode (#683) 2020-08-09 11:01:36 -07:00
Glenn Jocher a0ac5adb7b Single-source training update (#680) 2020-08-09 02:27:35 -07:00
Glenn Jocher 3c6e2f7668
Single-source training (#680)
* Single-source training

* Extract hyperparameters into seperate files

* weight decay scientific notation yaml reader bug fix

* remove import glob

* intersect_dicts() implementation

* 'or' bug fix

* .to(device) bug fix
2020-08-09 02:12:44 -07:00
NanoCode012 d7cfbc47ab
Fix unrecognized local rank argument (#676) 2020-08-08 16:40:10 -07:00
Glenn Jocher 93684531c6
train.py --logdir argparser addition (#660)
* train.py --logdir argparser addition

* train.py --logdir argparser addition
2020-08-06 22:26:38 -07:00
NanoCode012 886b9841c8
Add Multi-Node support for DDP Training (#504)
* Add support for multi-node DDP

* Remove local_rank confusion

* Fix spacing
2020-08-06 11:15:24 -07:00
lorenzomammana 728efa6576
Fix missing imports (#627)
* Fix missing imports

* Update detect.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-08-04 12:22:15 -07:00
Glenn Jocher eb99dff9ef import random bug fix (#614) 2020-08-03 10:52:59 -07:00
Jirka Borovec d5b6416c87
Explicit Imports (#498)
* expand imports

* optimize

* miss

* fix
2020-08-02 15:47:36 -07:00
Glenn Jocher f1096b2cf7 hyperparameter evolution update (#566) 2020-08-02 10:32:04 -07:00
Glenn Jocher c1a2a7a411 hyperparameter evolution bug fix (#566) 2020-08-01 23:00:10 -07:00
Glenn Jocher 8074745908 hyperparameter evolution bug fix (#566) 2020-08-01 19:24:14 -07:00
Glenn Jocher e32abb5fb9 hyperparameter evolution bug fix (#566) 2020-08-01 19:15:48 -07:00
Glenn Jocher 8056fe2db8 hyperparameter evolution bug fix (#566) 2020-08-01 15:07:40 -07:00
Glenn Jocher 127cbeb3f5 hyperparameter expansion to flips, perspective, mixup 2020-08-01 13:47:54 -07:00
Glenn Jocher bcd452c482 replace random_affine() with random_perspective()
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-31 15:53:52 -07:00
Liu Changyu c020875b17
PyTorch 1.6.0 update with native AMP (#573)
* PyTorch have Automatic Mixed Precision (AMP) Training.

* Fixed the problem of inconsistent code length indentation

* Fixed the problem of inconsistent code length indentation

* Mixed precision training is turned on by default
2020-07-31 10:52:45 -07:00
Laughing 4e2b9ecc7e
LR --resume repeat bug fix (#565) 2020-07-30 10:48:20 -07:00
AlexWang1900 a209a32019
Fix bug #541 #542 (#545)
* fix #541 #542

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-28 18:31:01 -07:00
NanoCode012 7f8471eaeb
--notest bug fix (#518)
* Fix missing results_file and fi when notest passed

* Update train.py

reverting previous changes and  removing functionality from 'if not opt.notest or final_epoch:  # Calculate mAP' loop.

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-25 10:24:39 -07:00
Glenn Jocher 9da56b62dd
v2.0 Release (#491)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-23 15:34:23 -07:00
Glenn Jocher 5e970d45c4
Update train.py (#462) 2020-07-22 12:32:03 -07:00
Glenn Jocher 3edc38f603 update train.py gsutil bucket fix (#463) 2020-07-21 23:25:33 -07:00
Glenn Jocher 776555771f update train.py gsutil bucket fix (#463) 2020-07-21 23:21:36 -07:00
Glenn Jocher b569ed6d6b pretrained model loading bug fix (#450)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-19 22:12:55 -07:00
yzchen 4102fcc9a7
[WIP] Feature/ddp fixed (#401)
* Squashed commit of the following:

commit d738487089e41c22b3b1cd73aa7c1c40320a6ebf
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 17:33:38 2020 +0700

    Adding world_size

    Reduce calls to torch.distributed. For use in create_dataloader.

commit e742dd9619d29306c7541821238d3d7cddcdc508
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 15:38:48 2020 +0800

    Make SyncBN a choice

commit e90d4004387e6103fecad745f8cbc2edc918e906
Merge: 5bf8beb cd90360
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Tue Jul 14 15:32:10 2020 +0800

    Merge pull request #6 from NanoCode012/patch-5

    Update train.py

commit cd9036017e7f8bd519a8b62adab0f47ea67f4962
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 13:39:29 2020 +0700

    Update train.py

    Remove redundant `opt.` prefix.

commit 5bf8bebe8873afb18b762fe1f409aca116fac073
Merge: c9558a9 a1c8406
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 14:09:51 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov5 into feature/DDP_fixed

commit c9558a9b51547febb03d9c1ca42e2ef0fc15bb31
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 13:51:34 2020 +0800

    Add device allocation for loss compute

commit 4f08c692fb5e943a89e0ee354ef6c80a50eeb28d
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 9 11:16:27 2020 +0800

    Revert drop_last

commit 1dabe33a5a223b758cc761fc8741c6224205a34b
Merge: a1ce9b1 4b8450b
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 9 11:15:49 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit a1ce9b1e96b71d7fcb9d3e8143013eb8cebe5e27
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 9 11:15:21 2020 +0800

    fix lr warning

commit 4b8450b46db76e5e58cd95df965d4736077cfb0e
Merge: b9a50ae 02c63ef
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Wed Jul 8 21:24:24 2020 +0800

    Merge pull request #4 from NanoCode012/patch-4

    Add drop_last for multi gpu

commit 02c63ef81cf98b28b10344fe2cce08a03b143941
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Wed Jul 8 10:08:30 2020 +0700

    Add drop_last for multi gpu

commit b9a50aed48ab1536f94d49269977e2accd67748f
Merge: ec2dc6c 121d90b
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 7 19:48:04 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov5 into feature/DDP_fixed

commit ec2dc6cc56de43ddff939e14c450672d0fbf9b3d
Merge: d0326e3 82a6182
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 7 19:34:31 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit d0326e398dfeeeac611ccc64198d4fe91b7aa969
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 7 19:31:24 2020 +0800

    Add SyncBN

commit 82a6182b3ad0689a4432b631b438004e5acb3b74
Merge: 96fa40a 050b2a5
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Tue Jul 7 19:21:01 2020 +0800

    Merge pull request #1 from NanoCode012/patch-2

    Convert BatchNorm to SyncBatchNorm

commit 050b2a5a79a89c9405854d439a1f70f892139b1c
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 7 12:38:14 2020 +0700

    Add cleanup for process_group

commit 2aa330139f3cc1237aeb3132245ed7e5d6da1683
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 7 12:07:40 2020 +0700

    Remove apex.parallel. Use torch.nn.parallel

    For future compatibility

commit 77c8e27e603bea9a69e7647587ca8d509dc1990d
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 7 01:54:39 2020 +0700

    Convert BatchNorm to SyncBatchNorm

commit 96fa40a3a925e4ffd815fe329e1b5181ec92adc8
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Mon Jul 6 21:53:56 2020 +0800

    Fix the datset inconsistency problem

commit 16e7c269d062c8d16c4d4ff70cc80fd87935dc95
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Mon Jul 6 11:34:03 2020 +0800

    Add loss multiplication to preserver the single-process performance

commit e83805563065ffd2e38f85abe008fc662cc17909
Merge: 625bb49 3bdea3f
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Fri Jul 3 20:56:30 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov5 into feature/DDP_fixed

commit 625bb49f4e52d781143fea0af36d14e5be8b040c
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 2 22:45:15 2020 +0800

    DDP established

* Squashed commit of the following:

commit 94147314e559a6bdd13cb9de62490d385c27596f
Merge: 65157e2 37acbdc
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 16 14:00:17 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov4 into feature/DDP_fixed

commit 37acbdc0b6
Author: Glenn Jocher <glenn.jocher@ultralytics.com>
Date:   Wed Jul 15 20:03:41 2020 -0700

    update test.py --save-txt

commit b8c2da4a0d
Author: Glenn Jocher <glenn.jocher@ultralytics.com>
Date:   Wed Jul 15 20:00:48 2020 -0700

    update test.py --save-txt

commit 65157e2fc97d371bc576e18b424e130eb3026917
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Wed Jul 15 16:44:13 2020 +0800

    Revert the README.md removal

commit 1c802bfa503623661d8617ca3f259835d27c5345
Merge: cd55b44 0f3b8bb
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Wed Jul 15 16:43:38 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit cd55b445c4dcd8003ff4b0b46b64adf7c16e5ce7
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Wed Jul 15 16:42:33 2020 +0800

    fix the DDP performance deterioration bug.

commit 0f3b8bb1fae5885474ba861bbbd1924fb622ee93
Author: Glenn Jocher <glenn.jocher@ultralytics.com>
Date:   Wed Jul 15 00:28:53 2020 -0700

    Delete README.md

commit f5921ba1e35475f24b062456a890238cb7a3cf94
Merge: 85ab2f3 bd3fdbb
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Wed Jul 15 11:20:17 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit bd3fdbbf1b08ef87931eef49fa8340621caa7e87
Author: Glenn Jocher <glenn.jocher@ultralytics.com>
Date:   Tue Jul 14 18:38:20 2020 -0700

    Update README.md

commit c1a97a7767ccb2aa9afc7a5e72fd159e7c62ec02
Merge: 2bf86b8 f796708
Author: Glenn Jocher <glenn.jocher@ultralytics.com>
Date:   Tue Jul 14 18:36:53 2020 -0700

    Merge branch 'master' into feature/DDP_fixed

commit 2bf86b892fa2fd712f6530903a0d9b8533d7447a
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 22:18:15 2020 +0700

    Fixed world_size not found when called from test

commit 85ab2f38cdda28b61ad15a3a5a14c3aafb620dc8
Merge: 5a19011 c8357ad
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 22:19:58 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit 5a19011949398d06e744d8d5521ab4e6dfa06ab7
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 22:19:15 2020 +0800

    Add assertion for <=2 gpus DDP

commit c8357ad5b15a0e6aeef4d7fe67ca9637f7322a4d
Merge: e742dd9 787582f
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Tue Jul 14 22:10:02 2020 +0800

    Merge pull request #8 from MagicFrogSJTU/NanoCode012-patch-1

    Modify number of dataloaders' workers

commit 787582f97251834f955ef05a77072b8c673a8397
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 20:38:58 2020 +0700

    Fixed issue with single gpu not having world_size

commit 63648925288d63a21174a4dd28f92dbfebfeb75a
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 19:16:15 2020 +0700

    Add assert message for clarification

    Clarify why assertion was thrown to users

commit 69364d6050e048d0d8834e0f30ce84da3f6a13f3
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 17:36:48 2020 +0700

    Changed number of workers check

commit d738487089e41c22b3b1cd73aa7c1c40320a6ebf
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 17:33:38 2020 +0700

    Adding world_size

    Reduce calls to torch.distributed. For use in create_dataloader.

commit e742dd9619d29306c7541821238d3d7cddcdc508
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 15:38:48 2020 +0800

    Make SyncBN a choice

commit e90d4004387e6103fecad745f8cbc2edc918e906
Merge: 5bf8beb cd90360
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Tue Jul 14 15:32:10 2020 +0800

    Merge pull request #6 from NanoCode012/patch-5

    Update train.py

commit cd9036017e7f8bd519a8b62adab0f47ea67f4962
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 14 13:39:29 2020 +0700

    Update train.py

    Remove redundant `opt.` prefix.

commit 5bf8bebe8873afb18b762fe1f409aca116fac073
Merge: c9558a9 a1c8406
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 14:09:51 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov5 into feature/DDP_fixed

commit c9558a9b51547febb03d9c1ca42e2ef0fc15bb31
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 14 13:51:34 2020 +0800

    Add device allocation for loss compute

commit 4f08c692fb5e943a89e0ee354ef6c80a50eeb28d
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 9 11:16:27 2020 +0800

    Revert drop_last

commit 1dabe33a5a223b758cc761fc8741c6224205a34b
Merge: a1ce9b1 4b8450b
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 9 11:15:49 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit a1ce9b1e96b71d7fcb9d3e8143013eb8cebe5e27
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 9 11:15:21 2020 +0800

    fix lr warning

commit 4b8450b46db76e5e58cd95df965d4736077cfb0e
Merge: b9a50ae 02c63ef
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Wed Jul 8 21:24:24 2020 +0800

    Merge pull request #4 from NanoCode012/patch-4

    Add drop_last for multi gpu

commit 02c63ef81cf98b28b10344fe2cce08a03b143941
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Wed Jul 8 10:08:30 2020 +0700

    Add drop_last for multi gpu

commit b9a50aed48ab1536f94d49269977e2accd67748f
Merge: ec2dc6c 121d90b
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 7 19:48:04 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov5 into feature/DDP_fixed

commit ec2dc6cc56de43ddff939e14c450672d0fbf9b3d
Merge: d0326e3 82a6182
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 7 19:34:31 2020 +0800

    Merge branch 'feature/DDP_fixed' of https://github.com/MagicFrogSJTU/yolov5 into feature/DDP_fixed

commit d0326e398dfeeeac611ccc64198d4fe91b7aa969
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Tue Jul 7 19:31:24 2020 +0800

    Add SyncBN

commit 82a6182b3ad0689a4432b631b438004e5acb3b74
Merge: 96fa40a 050b2a5
Author: yzchen <Chenyzsjtu@gmail.com>
Date:   Tue Jul 7 19:21:01 2020 +0800

    Merge pull request #1 from NanoCode012/patch-2

    Convert BatchNorm to SyncBatchNorm

commit 050b2a5a79a89c9405854d439a1f70f892139b1c
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 7 12:38:14 2020 +0700

    Add cleanup for process_group

commit 2aa330139f3cc1237aeb3132245ed7e5d6da1683
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 7 12:07:40 2020 +0700

    Remove apex.parallel. Use torch.nn.parallel

    For future compatibility

commit 77c8e27e603bea9a69e7647587ca8d509dc1990d
Author: NanoCode012 <kevinvong@rocketmail.com>
Date:   Tue Jul 7 01:54:39 2020 +0700

    Convert BatchNorm to SyncBatchNorm

commit 96fa40a3a925e4ffd815fe329e1b5181ec92adc8
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Mon Jul 6 21:53:56 2020 +0800

    Fix the datset inconsistency problem

commit 16e7c269d062c8d16c4d4ff70cc80fd87935dc95
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Mon Jul 6 11:34:03 2020 +0800

    Add loss multiplication to preserver the single-process performance

commit e83805563065ffd2e38f85abe008fc662cc17909
Merge: 625bb49 3bdea3f
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Fri Jul 3 20:56:30 2020 +0800

    Merge branch 'master' of https://github.com/ultralytics/yolov5 into feature/DDP_fixed

commit 625bb49f4e52d781143fea0af36d14e5be8b040c
Author: yizhi.chen <chenyzsjtu@outlook.com>
Date:   Thu Jul 2 22:45:15 2020 +0800

    DDP established

* Fixed destroy_process_group in DP mode

* Update torch_utils.py

* Update utils.py

Revert build_targets() to current master.

* Update datasets.py

* Fixed world_size attribute not found

Co-authored-by: NanoCode012 <kevinvong@rocketmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-19 12:33:30 -07:00
Glenn Jocher 07493a715c update train.py class count assertion #424
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-07-19 01:57:42 -07:00
Glenn Jocher 912c06a67c update train.py class count assertion #424 2020-07-19 01:51:41 -07:00
Glenn Jocher 65857adf52 update train.py ckpt loading 2020-07-18 14:34:12 -07:00
Glenn Jocher 03489aaafb comment tb_writer.add_hparams(hyp, {}) 2020-07-15 10:38:32 -07:00
Glenn Jocher 1e94bcf3d2
Merge pull request #384 from jancio/master
Log hyperparameters in tensorboard
2020-07-14 12:32:27 -07:00
Glenn Jocher 120d40c06a
Update train.py
This updates the PR to a one-liner to minimize additions. Perhaps we can include opt in the future but let's start with this for now.
2020-07-14 12:32:08 -07:00
Janko Ondras 38acc5f3c5 Fix img_size naming in hyperparameters logging 2020-07-14 08:48:46 +02:00
Glenn Jocher a1c8406af3 EMA and non_blocking=True 2020-07-13 20:19:10 -07:00
Glenn Jocher 140d84cca1 comment updates 2020-07-13 12:17:52 -07:00
Janko Ondras e558963244 Log hyperparameters in tensorboard
Log both hyperparameters and command line options in tensorboard.
2020-07-13 12:55:43 +02:00
Glenn Jocher 01a73ec08e multi-gpu ckpt filesize bug fix #253 2020-07-11 12:39:27 -07:00
Glenn Jocher a586751904 multi-gpu ckpt filesize bug fix #253 2020-07-11 12:35:21 -07:00
Glenn Jocher 5de4e25d68 update tensorboard metric 2020-07-11 11:39:02 -07:00
Glenn Jocher 98fc483abc train.py results.txt to bucket bug fix 2020-07-11 09:31:53 -07:00
Glenn Jocher 1c13e67b33 evolution bug fix #346 2020-07-09 22:08:42 -07:00
Glenn Jocher e16e9e43e1 new nc=len(names) check 2020-07-09 17:10:43 -07:00
Glenn Jocher cb527d3af9 new nc=len(names) check 2020-07-09 17:03:12 -07:00
Glenn Jocher 603ea0bfdc update log_dir to runs/exp #107 2020-07-09 15:58:07 -07:00
Glenn Jocher 72d5b58b9a disable LR plot to suppress warning message 2020-07-09 15:16:57 -07:00
Glenn Jocher 24c5a941f0 --resume EMA fix #292 2020-07-09 15:09:06 -07:00
Alex Stoken 9d631408a2
Move hyp and opt yaml save to top of train()
Fixes bug where scaled values were saved in hyp.yaml, which would cause continuity issues with --resume
2020-07-09 16:18:55 -05:00
Glenn Jocher bf6f41567a hyperparameter printout update 2020-07-08 17:21:00 -07:00
Glenn Jocher dc5e18390a
Merge branch 'master' into advanced_logging 2020-07-08 17:01:19 -07:00
Glenn Jocher 6b134d93c5
Update train.py 2020-07-08 16:58:13 -07:00
Glenn Jocher 16f6834486 update train.py and experimental.py 2020-07-08 14:23:34 -07:00
Alex Stoken 52bac22f09 Add in --resume functionality with option to specify path or to get most recent run 2020-07-07 10:42:28 -05:00
Alex Stoken f517ba81c7
Merge branch 'master' into advanced_logging 2020-07-06 16:52:11 -05:00
Laughing 956511dafd
fix LR bug 2020-07-05 15:08:24 +08:00
Glenn Jocher bb3c346916 model.yaml nc inherited from dataset.yaml 2020-07-04 17:51:54 -07:00
Glenn Jocher df224a0d8f EMA bug fix #279 2020-07-03 11:56:14 -07:00
Glenn Jocher 3bdea3f697 strip_optimizer() bug fix #253 2020-07-02 21:24:26 -07:00
Glenn Jocher e02a189a3a
Merge pull request #245 from yxNONG/patch-2
Unify the check point of single and multi GPU
2020-07-02 12:05:46 -07:00
Glenn Jocher 597ed4ce63
Update train.py 2020-07-02 12:00:55 -07:00
Glenn Jocher 13f69777a6 typo fix 2020-07-02 09:26:03 -07:00
yxNONG 1aa2b67933
Update train.py 2020-07-02 13:51:52 +08:00
Glenn Jocher 86784cfdbf --resume bug fix #252 2020-06-30 21:43:53 -07:00
Glenn Jocher ad4c22cbfe --resume bug fix #187 2020-06-30 16:16:29 -07:00
Glenn Jocher 3b16c865f0 assert --epochs 2020-06-30 14:08:08 -07:00
yxNONG cdb9bde181
Unify the check point of single and multi GPU
save the model.hyp etc to checkpoint when use multi GPU training
2020-06-30 19:06:28 +08:00
Glenn Jocher b203c9b7ff update train.py incompatible model message fix #222 2020-06-29 12:45:25 -07:00
Glenn Jocher 37e13f8846 update mosaic border 2020-06-27 13:50:15 -07:00
Alex Stoken e18e6811dc
Merge branch 'master' into advanced_logging 2020-06-27 10:13:03 -05:00
Glenn Jocher 22fb2b0c25 refactor dataloader 2020-06-26 18:56:13 -07:00
Glenn Jocher 256a3e89d2 small dataset bug fix #140 2020-06-25 17:52:56 -07:00
Glenn Jocher b50fdf16af model.names multi-GPU bug fix #94 2020-06-24 22:22:13 -07:00
Alex Stoken de191655e4 Fix yaml saving (don't sort keys), reorder --opt keys, bug fix hyp dict accessor 2020-06-24 17:21:54 -05:00
Alex Stoken 2d396bea00 Fix bug in --help from percent sign in help string 2020-06-24 16:57:12 -05:00
Glenn Jocher b8557f87e3 add stride to datasets.py 2020-06-24 13:02:27 -07:00
Alex Stoken 611aacf1bf Turn opt into dictionary before sending it to yaml 2020-06-24 10:49:08 -05:00
Alex Stoken bc4ef4861b Default optimizer SGD 2020-06-24 10:07:43 -05:00
Alex Stoken 7abf202cad Mode all optimizer settings to 'hyp.yaml', integrate proper momentum with Adam optimizer 2020-06-24 10:03:21 -05:00
Alex Stoken 7edbf6570e Fix help message for cfg files 2020-06-24 09:45:57 -05:00
Alex Stoken d64ad0fbf3 Remove --resume functionality and related checks/logic. 2020-06-24 09:17:27 -05:00
Glenn Jocher 6c1b87a42e update google_utils import 2020-06-22 23:00:23 -07:00
Glenn Jocher 1f1917ef56 remove fast, add merge 2020-06-21 13:37:11 -07:00
Alex Stoken e572bb0803 Add plot_results save location to log_dir 2020-06-21 09:36:28 -05:00
Lornatang 899f1d4bde Fix DDP bug in single process multiple device use cases 2020-06-20 13:00:03 +08:00
Glenn Jocher cdf1eac9f7
Merge pull request #107 from Lornatang/fix-reference-bugs
fix refrence bug
2020-06-19 14:51:41 -07:00
Glenn Jocher cce95e744d backbone as FP16, save default to FP32 2020-06-18 00:13:18 -07:00
Glenn Jocher d9b64c27c2 save ckpt in FP16 #119 2020-06-17 22:34:13 -07:00
Glenn Jocher 9fdb0fbacf AutoAnchor bug fix # 117 2020-06-17 19:51:15 -07:00
Alex Stoken c8152c81a6 Syntax fixes 2020-06-17 16:32:13 -05:00
Alex Stoken 9b7386f603 Add save_dir arg to test.test, use arg as location for saving batch jpgs 2020-06-17 16:08:46 -05:00
Alex Stoken 945307beba Add save_dir to plot_lr_scheduler and plot_labels
Set save_dir = log_dir in train.py
2020-06-17 16:03:18 -05:00
Alex Stoken 3b2b330872 Move results.txt from weights/ to log_dir 2020-06-17 15:55:45 -05:00
Alex Stoken ade023cff2 Fix hyp file read in and dict update.
Add example of hyp yaml
2020-06-17 10:59:20 -05:00
Lornatang 2368603484 fix refrence bug
In torch==1.5, the import of the API has changed. Although it does not interrupt the operation of the program, it seems to me to be an implicit error and may throw an exception in later versions.
2020-06-17 09:56:26 +08:00
Glenn Jocher 8db51c7002 tb_writer bug fix 2020-06-16 16:05:28 -07:00
Alex Stoken 5f2eeba233 remove old print statements 2020-06-16 17:09:39 -05:00
Glenn Jocher afe1df385b dist.destroy_process_group() bug fix 2020-06-16 15:08:14 -07:00
Alex Stoken 333f678b37 add update default hyp dict with provided yaml 2020-06-16 16:36:20 -05:00
Alex Stoken a448c3bcd7 add logic for resuming and getting hyp for resume run 2020-06-16 16:30:12 -05:00
Alex Stoken 25e51bcec7 add util function to get most recent last.pt file
added logic in train.py __main__ to handle resuming from a run
2020-06-16 15:50:27 -05:00
Alex Stoken 490f1e7b9c add save_dir arg to plot_lr_scheduler, default to current dir.
Uncomment plot_lr_scheduler in train() and pass log_dir as save location
2020-06-16 15:13:03 -05:00
Alex Stoken 4418809cf5 change weights dir (wdir) to be unique to each run, under log_dir 2020-06-16 15:09:51 -05:00
Alex Stoken d9f446cd81 add save yaml of opt and hyp to tensorboard log_dir in train() 2020-06-16 15:06:13 -05:00
Alex Stoken a85e6d0fc0 add parser arg for hyp yaml file 2020-06-16 14:53:32 -05:00
Glenn Jocher 5a50491fa1 check_anchors bug fix 2020-06-16 10:36:35 -07:00
Glenn Jocher 05b8ee5ca4 check_anchors() bug fix #102 2020-06-16 10:34:16 -07:00
Glenn Jocher ec81c7b5f2 check_anchors() bug fix #90 2020-06-16 10:14:04 -07:00
Glenn Jocher 8b26e89006 AutoAnchor bug fix #72 2020-06-16 00:53:34 -07:00
Glenn Jocher bdd9fee841 update fast mode 2020-06-16 00:29:54 -07:00
Glenn Jocher 1c0b6236e3 update fast mode 2020-06-16 00:11:29 -07:00
Glenn Jocher 915b1481fc default check_git_status() to True 2020-06-15 16:18:46 -07:00
Glenn Jocher 14523bb030 FP16 to FP32 ckpt load 2020-06-15 13:18:39 -07:00
Glenn Jocher c5966abba8 glob search bug fix #77 2020-06-15 12:08:57 -07:00
Glenn Jocher 31f3310029 assert best possible recall > 0.9 before training 2020-06-13 15:05:41 -07:00
Lauritzen Kasper Primdal c3d4d321d3 Ensures weights/ dir exists
Allows train.py to be run outside of yolov5/ directory.
2020-06-13 14:44:23 +02:00
Glenn Jocher 099e6f5ebd --img-size stride-multiple verification 2020-06-12 22:10:46 -07:00
Glenn Jocher 22d6088205 speed-reproducibility fix #17 2020-06-05 13:07:09 -07:00
Glenn Jocher 55ca5c74d2 multi-scale fix #16 2020-06-05 12:57:16 -07:00
Glenn Jocher 7c2832cd49 assert equal model and dataset classes 2020-06-04 17:21:22 -07:00
Glenn Jocher 11121e39ed updates 2020-06-04 16:52:07 -07:00
Glenn Jocher eb97b2e413 NMS fast mode 2020-06-03 13:02:59 -07:00
Glenn Jocher ce36905358 updates 2020-05-30 00:12:45 -07:00
Glenn Jocher 1e84a23f38 initial commit 2020-05-29 17:04:54 -07:00