1456 Commits

Author SHA1 Message Date
Glenn Jocher
90e60b403d
Update np.random.random() to random.random() (#3967) 2021-07-11 16:56:36 +02:00
Glenn Jocher
8298ce5e88
Update albumentations>=1.0.2 (#3966) 2021-07-11 15:49:30 +02:00
Glenn Jocher
80299a57e2
Numerical stability fix for Albumentations (#3958) 2021-07-10 19:50:53 +02:00
Glenn Jocher
443af8b25a
Cache v0.4 update (#3954) 2021-07-10 14:18:46 +02:00
Glenn Jocher
a26e7de2bf
Update augmentations.py (#3948) 2021-07-09 16:45:04 +02:00
Glenn Jocher
248504cf13
Feature visualization improvements 32 (#3947) 2021-07-09 15:23:02 +02:00
Glenn Jocher
dabad5793a Created using Colaboratory 2021-07-08 15:45:53 +02:00
Eldar Kurtic
e7888af94c
Fix inconsistent NMS IoU value for COCO (#3934)
Evaluation of 'best' and 'last' models will use the same params as the evaluation during the training phase. 
This PR fixes https://github.com/ultralytics/yolov5/issues/3907
2021-07-08 15:29:02 +02:00
Glenn Jocher
8c6f9e15bf
Update dataset_stats() for zipped datasets (#3926)
* Update `dataset_stats()` for zipped datasets

@KalenMike

* cleanup
2021-07-08 11:42:30 +02:00
Glenn Jocher
850970e081
feature_visualization() CUDA fix (#3925) 2021-07-07 16:23:31 +02:00
jmiranda-laplateforme
588094eb7a
Update setattr() default for Hub PIL images (#3923)
Fix inference from PIL source.
2021-07-07 16:13:12 +02:00
Glenn Jocher
411842e058
Fix torch.hub.list('ultralytics/yolov5') pathlib bug (#3921) 2021-07-07 16:08:42 +02:00
Glenn Jocher
87b094bcbc
Feature visualization update (#3920)
* Feature visualization update

* Save to jpg (faster)

* Save to png
2021-07-07 15:41:58 +02:00
johnohagan
61047a2b4f
Save PyTorch Hub models to /root/hub/cache/dir (#3904)
* Create hubconf.py

* Add save_dir variable

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-07 13:41:46 +02:00
Glenn Jocher
33202b7f0b
YOLOv5 + Albumentations integration (#3882)
* Albumentations integration

* ToGray p=0.01

* print confirmation

* create instance in dataloader init method

* improved version handling

* transform not defined fix

* assert string update

* create check_version()

* add spaces

* update class comment
2021-07-05 18:01:54 +02:00
Glenn Jocher
6a3ee7cf03
Hub models map_location=device (#3894)
* Hub models `map_location=device`

* cleanup
2021-07-05 16:20:46 +02:00
Glenn Jocher
8930e22cce
Evolution commented hyp['anchors'] fix (#3887)
Fix for `KeyError: 'anchors'` error when start hyperparameter evolution:
```bash
python train.py --evolve
```

```bash
Traceback (most recent call last):
  File "E:\yolov5\train.py", line 623, in <module>
    hyp[k] = max(hyp[k], v[1])  # lower limit
KeyError: 'anchors'
```
2021-07-05 12:48:27 +02:00
Glenn Jocher
3c3f8fbd5d
Improved BGR2RGB speeds (#3880)
* Update BGR2RGB ops

* speed improvements

* cleanup
2021-07-04 20:12:32 +02:00
Glenn Jocher
9e8fb9fd0b
Create utils/augmentations.py (#3877)
* Create `utils/augmentations.py`

* cleanup
2021-07-04 18:14:04 +02:00
Glenn Jocher
81b31824f5
Models *.yaml reformat (#3875) 2021-07-04 16:55:08 +02:00
Glenn Jocher
bd88e7f4f2 Created using Colaboratory 2021-07-04 15:55:23 +02:00
ketan-b
9d86b54eb3
Add multi-stream saving feature (#3864)
* Added the recording feature for multiple streams

Thanks for the very cool repo!!
I was trying to record multiple feeds at the same time, but the current version of the detector only had one video writer and one vid_path!
So the streams were not being saved and only were initialized with one frame and this process didn't record the whole thing.

Fix:
I made a list of `vid_writer` and `vid_path` and the `i` from the loop over the `pred` took care of the writer which need to work!

I hope this helps, Thanks!

* Cleanup list lengths

* batch size variable

* Update datasets.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-04 12:55:57 +02:00
san-soucie
d3e9d69850
--evolve 300 generations CLI argument (#3863)
* evolve command accepts argument for number of generations

* evolve generations argument used in evolve for loop

* evolve argument boolean fixes

* default to 300 evolve generations

* Update train.py

Co-authored-by: John San Soucie <jsansoucie@whoi.edu>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-04 12:14:35 +02:00
Valentin Aliferov
831773f5a2
Add EXIF rotation to YOLOv5 Hub inference (#3852)
* rotating an image according to its exif tag

* Update common.py

* Update datasets.py

* Update datasets.py

faster

* delete extraneous gpg file

* Update common.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-02 13:25:54 +02:00
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