Commit Graph

1282 Commits (4717a3b0380c540210a60c38a20442e8884d5459)
 

Author SHA1 Message Date
Glenn Jocher 4717a3b038 Created using Colaboratory 2021-07-02 12:24:27 +02:00
Glenn Jocher b6863385b5 Created using Colaboratory 2021-07-02 12:23:09 +02:00
Glenn Jocher c6c88dc601
Copy-Paste augmentation for YOLOv5 (#3845)
* Copy-paste augmentation initial commit

* if any segments

* Add obscuration rejection

* Add copy_paste hyperparameter

* Update comments
2021-07-01 00:35:04 +02:00
Glenn Jocher 25d1f2932c
Plot `AutoShape()` detections in ascending order (#3843) 2021-06-30 15:10:40 +02:00
Feras Oughali 7d6af69638
Fix `LoadStreams()` dataloader frame skip issue (#3833)
* Update datasets.py to read every 4th frame of streams

* Update datasets.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-30 12:11:29 +02:00
Glenn Jocher 57c5d02bbe
Concise `TransformerBlock()` (#3821) 2021-06-29 16:03:10 +02:00
Glenn Jocher 5ea771d93d
Move IoU functions to metrics.py (#3820) 2021-06-29 13:18:13 +02:00
Glenn Jocher 3213d8713f
Fix for `dataset_stats()` with updated data.yaml (#3819)
@KalenMike
2021-06-29 12:44:59 +02:00
Glenn Jocher 02719dde52
Update `feature_visualization()` (#3807)
* Update `feature_visualization()`

Only plot for data with height, width > 1

* cleanup

* Cleanup
2021-06-28 13:48:14 +02:00
Zigarss 20d45aa4f1
Add feature map visualization (#3804)
* Add feature map visualization

Add a feature_visualization function to visualize the mid feature map of the model.

* Update yolo.py

* remove boolean from forward and reorder if statement

* remove print from forward

* General cleanup

* Indent

* Update plots.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-28 13:18:45 +02:00
yellowdolphin 3974d725b6
Fix warmup `accumulate` (#3722)
* gradient accumulation during warmup in train.py

Context:
`accumulate` is the number of batches/gradients accumulated before calling the next optimizer.step().
During warmup, it is ramped up from 1 to the final value nbs / batch_size. 
Although I have not seen this in other libraries, I like the idea. During warmup, as grads are large, too large steps are more of on issue than gradient noise due to small steps.

The bug:
The condition to perform the opt step is wrong
> if ni % accumulate == 0:
This produces irregular step sizes if `accumulate` is not constant. It becomes relevant when batch_size is small and `accumulate` changes many times during warmup.

This demo also shows the proposed solution, to use a ">=" condition instead:
https://colab.research.google.com/drive/1MA2z2eCXYB_BC5UZqgXueqL_y1Tz_XVq?usp=sharing

Further, I propose not to restrict the number of warmup iterations to >= 1000. If the user changes hyp['warmup_epochs'], this causes unexpected behavior. Also, it makes evolution unstable if this parameter was to be optimized.

* replace last_opt_step tracking by do_step(ni)

* add docstrings

* move down nw

* Update train.py

* revert math import move

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-28 12:25:13 +02:00
batrlatom 5e976a274d
Fix competition link (#3799)
* link to the competition repaired

* Update README.md

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-27 15:28:50 +02:00
Glenn Jocher 47543f97b1
FROM nvcr.io/nvidia/pytorch:21.05-py3 (#3794) 2021-06-26 17:12:43 +02:00
Glenn Jocher 5e6886c860
Update Dockerfile (#3792) 2021-06-26 16:51:17 +02:00
Glenn Jocher 96c87f1711
nvcr.io/nvidia/pytorch:21.06-py3 (#3791) 2021-06-26 16:28:06 +02:00
Glenn Jocher 07166ba38c
Update Usage examples (#3790) 2021-06-26 16:09:56 +02:00
Glenn Jocher 92d49fde35
Update seeds for single-GPU reproducibility (#3789)
For seed=0 on single-GPU.
2021-06-26 15:42:40 +02:00
Glenn Jocher 8e7f285051
Fix datasets for aws and get_coco.sh (#3788)
* merge master

* Update get_coco.sh
2021-06-26 15:29:16 +02:00
Glenn Jocher bd581b330b
Create hyp.scratch-p6.yaml (#3787) 2021-06-26 15:13:06 +02:00
Glenn Jocher 8035b61682
Update objectness IoU sort (#3786) 2021-06-26 14:52:18 +02:00
Glenn Jocher 157aa2f886
Objectness IoU Sort (#3610)
Co-authored-by: U-LAPTOP-5N89P8V7\banhu <ban.huang@foxmail.com>
2021-06-26 14:45:53 +02:00
Glenn Jocher 9dc5d35fce
Update README.md fix banner width (#3785) 2021-06-26 13:05:46 +02:00
Glenn Jocher f89941711c
NGA xView 2018 Dataset Auto-Download (#3775)
* update clip_coords for numpy

* uncomment

* cleanup

* Add autosplits

* fix

* cleanup
2021-06-26 00:49:05 +02:00
Ayush Chaurasia ffb6e11050
W&B: Update Tables API and comply with new dataset_check (#3772)
* Update tables API and windows path fix

* update dataset check
2021-06-25 20:45:33 +02:00
Piotr Skalski 09246a5a33
fix/incorrect_fitness_import (#3770) 2021-06-25 16:16:18 +02:00
Glenn Jocher f2d97ebb25
Remove DDP MultiHeadAttention fix (#3768) 2021-06-25 12:52:05 +02:00
Yonghye Kwon 374957317a
Add `xyxy2xywhn()` (#3765)
* Edit Comments for numpy2torch tensor process

Edit Comments for numpy2torch tensor process

* add xyxy2xywhn

add xyxy2xywhn

* add xyxy2xywhn

* formatting

* pass arguments

pass arguments

* edit comment for xyxy2xywhn()

edit comment for xyxy2xywhn()

* cleanup datasets.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-25 11:47:46 +02:00
Glenn Jocher 03281f8c76
COCO annotations JSON fix (#3764) 2021-06-25 01:55:53 +02:00
Glenn Jocher f79d7479da
Add optional dataset.yaml `path` attribute (#3753)
* Add optional dataset.yaml `path` attribute

@KalenMike

* pass locals to python scripts

* handle lists

* update coco128.yaml

* Capitalize first letter

* add test key

* finalize GlobalWheat2020.yaml

* finalize objects365.yaml

* finalize SKU-110K.yaml

* finalize SKU-110K.yaml

* finalize VisDrone.yaml

* NoneType fix

* update download comment

* voc to VOC

* update

* update VOC.yaml

* update VOC.yaml

* remove dashes

* delete get_voc.sh

* force coco and coco128 to ../datasets

* Capitalize Argoverse_HD.yaml

* Capitalize Objects365.yaml

* update Argoverse_HD.yaml

* coco segments fix

* VOC single-thread

* update Argoverse_HD.yaml

* update data_dict in test handling

* create root
2021-06-25 01:25:03 +02:00
Yonghye Kwon 417a2f425c
Edit comment (#3759)
edit comment
2021-06-24 15:57:27 +02:00
Glenn Jocher ae4261c774
Force non-zero hyp evolution weights `w` (#3748)
Fix for https://github.com/ultralytics/yolov5/issues/3741
2021-06-23 12:56:22 +02:00
Glenn Jocher fdc22398fa
Create `data/hyps` directory (#3747) 2021-06-23 12:49:38 +02:00
Glenn Jocher 63060910a6
Update `check_datasets()` for dynamic unzip path (#3732)
@KalenMike
2021-06-22 16:05:38 +02:00
Glenn Jocher 9ac7d388a9
Backwards compatible cache version checks (#3730) 2021-06-22 13:50:47 +02:00
fcakyon 0e2d0d54d7
Fix typo (#3729) 2021-06-22 13:33:38 +02:00
Glenn Jocher b83e1a4adc
Fix `img2label_paths()` order (#3720)
* Fix `img2label_paths()` order

* fix, 1
2021-06-21 22:50:56 +02:00
Glenn Jocher 1f69d12591
Update 4 main ops for paths and .run() (#3715)
* Add yolov5/ to path

* rename functions to run()

* cleanup

* rename fix

* CI fix

* cleanup find models/export.py
2021-06-21 17:25:04 +02:00
Ayush Chaurasia 75c0ff43af
[x]W&B: Don't resume transfer learning runs (#3604)
* Allow config cahnge

* Allow val change in wandb config

* Don't resume transfer learning runs

* Add entity in log dataset
2021-06-21 14:00:25 +02:00
Glenn Jocher e8810a53e8
Update DDP backend `if dist.is_nccl_available()` (#3705) 2021-06-20 17:15:42 +02:00
Glenn Jocher fbf41e0913
Add `train.run()` method (#3700)
* Update train.py explicit arguments

* Update train.py

* Add run method
2021-06-20 15:06:58 +02:00
Glenn Jocher c1af67dcd4
Add torch DP warning (#3698) 2021-06-19 19:50:46 +02:00
Glenn Jocher b3e2f4e08d
Eliminate `total_batch_size` variable (#3697)
* Eliminate `total_batch_size` variable

* cleanup

* Update train.py
2021-06-19 19:14:59 +02:00
Glenn Jocher fad27c0046
Update DDP for `torch.distributed.run` with `gloo` backend (#3680)
* Update DDP for `torch.distributed.run`

* Add LOCAL_RANK

* remove opt.local_rank

* backend="gloo|nccl"

* print

* print

* debug

* debug

* os.getenv

* gloo

* gloo

* gloo

* cleanup

* fix getenv

* cleanup

* cleanup destroy

* try nccl

* return opt

* add --local_rank

* add timeout

* add init_method

* gloo

* move destroy

* move destroy

* move print(opt) under if RANK

* destroy only RANK 0

* move destroy inside train()

* restore destroy outside train()

* update print(opt)

* cleanup

* nccl

* gloo with 60 second timeout

* update namespace printing
2021-06-19 16:30:25 +02:00
Glenn Jocher 5bab9a28e4
Reformat (#3694) 2021-06-19 14:21:28 +02:00
lb-desupervised bfb2276b1d
Slightly modify CLI execution (#3687)
* Slightly modify CLI execution

This simple change makes it easier to run the primary functions of this
repo (train/detect/test) from within Python. An object which represents
`opt` can be constructed and fed to the `main` function of each of these
modules, rather than having to call the lower level functions directly,
or run the module as a script.

* Update export.py

Add CLI parsing update for more convenient module usage within Python.

Co-authored-by: Lewis Belcher <lb@desupervised.io>
2021-06-19 12:06:59 +02:00
Mai Thanh Minh bf209f6fe9
Skip HSV augmentation when hyperparameters are [0, 0, 0] (#3686)
* Create shortcircuit in augment_hsv when hyperparameter are zero

* implement faster opt-in

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-19 11:51:21 +02:00
Glenn Jocher 814806c61d
Update cache check (#3691)
Swapped order of operations for faster first per f527704cd3 (r52362419)
2021-06-19 11:22:09 +02:00
Glenn Jocher 463628a4d8
Update README.md (#3684) 2021-06-18 17:12:42 +02:00
ZouJiu1 2729761458
EMA changes for pre-model's batch_size (#3681)
* EMA changes for pre-model's batch_size

* Update train.py

* Update torch_utils.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-18 16:26:52 +02:00
Glenn Jocher f527704cd3
Cache v0.3: improved corrupt image/label reporting (#3676)
* Cache v0.3: improved corrupt image/label reporting

Fix for https://github.com/ultralytics/yolov5/issues/3656#issuecomment-863660899

* cleanup
2021-06-18 10:21:47 +02:00