Commit Graph
100 Commits
Author SHA1 Message Date
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
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 JocherandU-LAPTOP-5N89P8V7\banhu 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
Glenn Jocher f2d97ebb25 Remove DDP MultiHeadAttention fix (#3768) 2021-06-25 12:52:05 +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
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
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
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
Glenn Jocher 814806c61d Update cache check (#3691)
Swapped order of operations for faster first per https://github.com/ultralytics/yolov5/commit/f527704cd32c42bc0bba9cce04601783b8563204#r52362419
2021-06-19 11:22:09 +02:00
Glenn Jocher 463628a4d8 Update README.md (#3684) 2021-06-18 17:12:42 +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
Glenn Jocher 2296f1546f Update WORLD_SIZE and RANK retrieval (#3670) 2021-06-17 23:24:30 +02:00
Glenn Jocher 045d5d8629 Update TensorBoard (#3669) 2021-06-17 22:12:42 +02:00
Glenn Jocher fa201f968e Update train(hyp, *args) to accept hyp file or dict (#3668) 2021-06-17 22:03:25 +02:00
Glenn Jocher 6d6e2ca65f Update train.py (#3667) 2021-06-17 21:32:39 +02:00
Glenn Jocher ac34834563 Update download_weights.sh comment (#3662) 2021-06-17 16:21:10 +02:00
Glenn Jocher 2754adad46 Remove /weights directory (#3659)
* Remove `/weights` directory

* cleanup
2021-06-17 14:44:12 +02:00
Glenn Jocher 9b6dba6207 Update dataset_stats() to list of dicts (#3657)
* Update `dataset_stats()` to list of dicts

@KalenMike

* Update datasets.py
2021-06-17 13:59:52 +02:00
Glenn Jocher 6187edcb53 Update CONTRIBUTING.md (#3647) 2021-06-16 19:57:11 +02:00
Glenn Jocher 3ce0db89b0 Update CONTRIBUTING.md (#3645)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2021-06-16 19:48:30 +02:00
Glenn Jocher bb79e13d52 RUN pip install --no-cache -U torch torchvision (#3637) 2021-06-16 12:35:33 +02:00
Glenn Jocher 6c0e1d9fd7 Update verify_image_label() (#3635) 2021-06-16 11:12:15 +02:00
Glenn Jocher 65f81bfefa Add **/*.torchscript.pt (#3634) 2021-06-16 10:49:50 +02:00
Glenn Jocher de56813ba8 FROM nvcr.io/nvidia/pytorch:21.05-py3 (#3633) 2021-06-16 10:40:31 +02:00
Glenn Jocher 30e4c4f092 Update README.md (#3624) 2021-06-15 15:44:10 +02:00
Glenn Jocher 7d3686a686 Update check_file() (#3622)
* Update `check_file()`

* Update datasets.py
2021-06-15 13:21:04 +02:00
Glenn Jocher 239a11c197 Download COCO and VOC by default (#3608) 2021-06-14 13:58:54 +02:00
Glenn Jocher f8adee156d merge develop 2021-06-14 10:45:15 +02:00
Glenn Jocher 88b1945241 Delete __init__.py (#3596) 2021-06-12 15:21:37 +02:00
Glenn Jocher 7a565f130a Update dataset_stats() (#3593)
@KalenMike this is a PR to add image filenames and labels to our stats dictionary and to save the dictionary to JSON. Save location is next to the train labels.cache file. The single JSON contains all stats for entire dataset.

Usage example:
```python
from utils.datasets import *

dataset_stats('coco128.yaml', verbose=True)
```
2021-06-12 13:26:41 +02:00
Glenn Jocher 4984cf54be train.py GPU memory fix (#3590)
* train.py GPU memory fix

* ema

* cuda

* cuda

* zeros input

* to device

* batch index 0
2021-06-11 20:24:03 +02:00
Glenn Jocher e8c5237403 ConfusionMatrix normalize=True fix (#3587) 2021-06-11 11:46:05 +02:00
Glenn Jocher ec2da4a82c Add ConfusionMatrix normalize=True flag (#3586) 2021-06-11 11:37:08 +02:00
Glenn Jocher 46e1fdfbc6 Update stale.yml (#3585) 2021-06-11 11:23:39 +02:00
Glenn Jocher 5c32bd3080 Created using Colaboratory 2021-06-10 16:01:34 +02:00
Glenn Jocher 53ed872c28 Update export.py, yolo.py sys.path.append() (#3579) 2021-06-10 15:35:22 +02:00
Glenn Jocher 095197bd4a Ignore Seaborn plot warnings (#3576)
* Ignore Seaborn plot warnings

* Update plots.py

* Update metrics.py
2021-06-10 13:51:29 +02:00
Glenn Jocher 4695ca8314 Refactoring cleanup (#3565)
* Refactoring cleanup

* Update test.py
2021-06-09 22:50:27 +02:00
Glenn Jocher 0e5cfdbea7 Refactor models/export.py arguments (#3564)
* Refactor models/export.py arguments

* cleanup

* cleanup
2021-06-09 22:43:46 +02:00
Glenn Jocher 66cf5c28c1 Refactor detect.py arguments (#3559)
* Refactor detect.py arguments

@SkalskiP @KalenMike

* unused ok

* comment arguments
2021-06-09 22:19:34 +02:00
Glenn Jocher a9553c04a7 Refactor test.py arguments (#3558)
* remove opt from test()

* pass kwargs

* update comments

* revert accidental default change

* multiple --img options

* add comments
2021-06-09 21:36:10 +02:00
Glenn Jocher 4ef9261870 Remove redundant speed/study half argument (#3557) 2021-06-09 16:30:01 +02:00
Glenn Jocher 5948f20a3d Update test.py profiling (#3555)
* Update test.py profiling

* half_precision to half

* inplace
2021-06-09 16:25:17 +02:00
Glenn Jocher 8b5086c21b Multi-GPU default to single device 0 (#3554)
* Multi-GPU default to single device 0

* Multi-GPU default to single device 0

* add space
2021-06-09 15:31:47 +02:00
Glenn Jocher 63157d214d Remove is_coco argument from test() (#3553) 2021-06-09 15:09:51 +02:00
Glenn Jocher 958ab92dc1 Remove opt from create_dataloader()` (#3552) 2021-06-09 13:14:56 +02:00
Glenn Jocher 0cfc5b2c18 Update README.md (#3550)
Add permanent splash URL and update hyperlink from iOS landing page to Ultralytics YOLOv5 landing page at https://ultralytics.com/yolov5
2021-06-09 11:49:25 +02:00
Glenn Jocher f8ec71e1c2 Update check_python(minimum=3.6.2) (#3548) 2021-06-09 11:34:15 +02:00
Glenn Jocher ef0b5c9d29 On-demand pycocotools pip install (#3547) 2021-06-09 11:22:21 +02:00
Glenn Jocher 1b5edb6f8e Update dataset_stats() for HUB (#3536)
* Update `dataset_stats()` for HUB 

Cleanup of b6fdd2e

* autodownload flag

* Update general.py

* cleanup
2021-06-09 10:56:11 +02:00
Glenn Jocher b6fdd2e5e5 Create dataset_stats() for HUB 2021-06-08 23:09:45 +02:00
Glenn Jocher ac8691e208 Created using Colaboratory 2021-06-08 19:01:52 +02:00
Glenn Jocher 78cf488556 Created using Colaboratory 2021-06-08 18:54:33 +02:00
Glenn Jocher c6b51f4189 Update FP16 --half argument for test.py and detect.py (#3532)
* Update FP16 `--half` argument for test.py and detect.py

* Update detect.py
2021-06-08 18:47:13 +02:00
Glenn Jocher 8d52c1c5c5 Update datasets.py (#3531)
Minor updates to https://github.com/ultralytics/yolov5/pull/3505, inplace accumulation.
2021-06-08 18:36:40 +02:00
Glenn Jocher ed651873ff Merge branch 'develop' 2021-06-08 18:14:18 +02:00
+1 f3c3d2ce5d Merge develop branch into master (#3518)
* update ci-testing.yml (#3322)

* update ci-testing.yml

* update greetings.yml

* bring back os matrix

* update ci-testing.yml (#3322)

* update ci-testing.yml

* update greetings.yml

* bring back os matrix

* Enable direct `--weights URL` definition (#3373)

* Enable direct `--weights URL` definition

@KalenMike this PR will enable direct --weights URL definition. Example use case:
```
python train.py --weights https://storage.googleapis.com/bucket/dir/model.pt
```

* cleanup

* bug fixes

* weights = attempt_download(weights)

* Update experimental.py

* Update hubconf.py

* return bug fix

* comment mirror

* min_bytes

* Update tutorial.ipynb (#3368)

add Open in Kaggle badge

* `cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379)

* Update datasets.py

* comment

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* COCO evolution fix (#3388)

* COCO evolution fix

* cleanup

* update print

* print fix

* Create `is_pip()` function (#3391)

Returns `True` if file is part of pip package. Useful for contextual behavior modification.

```python
def is_pip():
    # Is file in a pip package?
    return 'site-packages' in Path(__file__).absolute().parts
```

* Revert "`cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379)" (#3395)

This reverts commit 21a9607e00.

* Update FLOPs description (#3422)

* Update README.md

* Changing FLOPS to FLOPs.

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>

* Parse URL authentication (#3424)

* Parse URL authentication

* urllib.parse.unquote()

* improved error handling

* improved error handling

* remove %3F

* update check_file()

* Add FLOPs title to table (#3453)

* Suppress jit trace warning + graph once (#3454)

* Suppress jit trace warning + graph once

Suppress harmless jit trace warning on TensorBoard add_graph call. Also fix multiple add_graph() calls bug, now only on batch 0.

* Update train.py

* Update MixUp augmentation `alpha=beta=32.0` (#3455)

Per VOC empirical results https://github.com/ultralytics/yolov5/issues/3380#issuecomment-853001307 by @developer0hye

* Add `timeout()` class (#3460)

* Add `timeout()` class

* rearrange order

* Faster HSV augmentation (#3462)

remove datatype conversion process that can be skipped

* Add `check_git_status()` 5 second timeout (#3464)

* Add check_git_status() 5 second timeout

This should prevent the SSH Git bug that we were discussing @KalenMike

* cleanup

* replace timeout with check_output built-in timeout

* Improved `check_requirements()` offline-handling (#3466)

Improve robustness of `check_requirements()` function to offline environments (do not attempt pip installs when offline).

* Add `output_names` argument for ONNX export with dynamic axes (#3456)

* Add output names & dynamic axes for onnx export

Add output_names and dynamic_axes names for all outputs in torch.onnx.export. The first four outputs of the model will have names output0, output1, output2, output3

* use first output only + cleanup

Co-authored-by: Samridha Shrestha <samridha.shrestha@g42.ai>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Revert FP16 `test.py` and `detect.py` inference to FP32 default (#3423)

* fixed inference bug ,while use half precision

* replace --use-half with --half

* replace space and PEP8 in detect.py

* PEP8 detect.py

* update --half help comment

* Update test.py

* revert space

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Add additional links/resources to stale.yml message (#3467)

* Update stale.yml

* cleanup

* Update stale.yml

* reformat

* Update stale.yml HUB URL (#3468)

* Stale `github.actor` bug fix (#3483)

* Explicit `model.eval()` call `if opt.train=False` (#3475)

* call model.eval() when opt.train is False

call model.eval() when opt.train is False

* single-line if statement

* cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* check_requirements() exclude `opencv-python` (#3495)

Fix for 3rd party or contrib versions of installed OpenCV as in https://github.com/ultralytics/yolov5/issues/3494.

* Earlier `assert` for cpu and half option (#3508)

* early assert for cpu and half option

early assert for cpu and half option

* Modified comment

Modified comment

* Update tutorial.ipynb (#3510)

* Reduce test.py results spacing (#3511)

* Update README.md (#3512)

* Update README.md

Minor modifications

* 850 width

* Update greetings.yml

revert greeting change as PRs will now merge to master.

Co-authored-by: Piotr Skalski <SkalskiP@users.noreply.github.com>
Co-authored-by: SkalskiP <piotr.skalski92@gmail.com>
Co-authored-by: Peretz Cohen <pizzaz93@users.noreply.github.com>
Co-authored-by: tudoulei <34886368+tudoulei@users.noreply.github.com>
Co-authored-by: chocosaj <chocosaj@users.noreply.github.com>
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Sam_S <SamSamhuns@users.noreply.github.com>
Co-authored-by: Samridha Shrestha <samridha.shrestha@g42.ai>
Co-authored-by: edificewang <609552430@qq.com>
2021-06-08 10:22:10 +02:00
Glenn Jocher c058a61e3b Update greetings.yml
revert greeting change as PRs will now merge to master.
2021-06-08 10:11:06 +02:00
Glenn Jocher abb2a96e91 Update README.md (#3512)
* Update README.md

Minor modifications

* 850 width
2021-06-08 00:39:02 +02:00
Glenn Jocher d986145b9a Reduce test.py results spacing (#3511) 2021-06-07 23:21:34 +02:00
Glenn Jocher eede7dc48c Update tutorial.ipynb (#3510) 2021-06-07 22:52:16 +02:00
Glenn Jocher 3f03acb3db check_requirements() exclude opencv-python (#3507)
Duplicate of #3495 merged to `develop`. This PR will be merged to `master`.

Fixes https://github.com/ultralytics/yolov5/issues/3494.
2021-06-07 15:38:51 +02:00
Glenn Jocher 90b7895d65 check_requirements() exclude opencv-python (#3495)
Fix for 3rd party or contrib versions of installed OpenCV as in https://github.com/ultralytics/yolov5/issues/3494.
2021-06-07 10:03:47 +02:00
Glenn Jocher cf4f95bc5f Stale github.actor bug fix (#3483) 2021-06-06 18:06:24 +02:00
Glenn Jocher 3597d280ee Update stale.yml HUB URL (#3468) 2021-06-04 23:49:43 +02:00
Glenn Jocher 739451da5a Add additional links/resources to stale.yml message (#3467)
* Update stale.yml

* cleanup

* Update stale.yml

* reformat
2021-06-04 23:45:24 +02:00
Glenn Jocher 317f2ccc9d Improved check_requirements() offline-handling (#3466)
Improve robustness of `check_requirements()` function to offline environments (do not attempt pip installs when offline).
2021-06-04 21:34:36 +02:00
Glenn Jocher 563ea9475a Add check_git_status() 5 second timeout (#3464)
* Add check_git_status() 5 second timeout

This should prevent the SSH Git bug that we were discussing @KalenMike

* cleanup

* replace timeout with check_output built-in timeout
2021-06-04 21:17:36 +02:00
Glenn Jocher d40481acc5 Add timeout() class (#3460)
* Add `timeout()` class

* rearrange order
2021-06-04 15:23:33 +02:00
Glenn Jocher 8e3b4a0bf3 Update MixUp augmentation alpha=beta=32.0 (#3455)
Per VOC empirical results https://github.com/ultralytics/yolov5/issues/3380#issuecomment-853001307 by @developer0hye
2021-06-04 12:47:53 +02:00
Glenn Jocher 4aa2959101 Suppress jit trace warning + graph once (#3454)
* Suppress jit trace warning + graph once

Suppress harmless jit trace warning on TensorBoard add_graph call. Also fix multiple add_graph() calls bug, now only on batch 0.

* Update train.py
2021-06-04 12:37:41 +02:00
Glenn Jocher af2bc3a1c3 Add FLOPs title to table (#3453) 2021-06-04 11:46:40 +02:00
Glenn Jocher f8651c388f Parse URL authentication (#3424)
* Parse URL authentication

* urllib.parse.unquote()

* improved error handling

* improved error handling

* remove %3F

* update check_file()
2021-06-03 18:44:58 +02:00
Glenn Jocher fdbe527dc0 Revert "cv2.imread(img, -1) for IMREAD_UNCHANGED (#3379)" (#3395)
This reverts commit 21a9607e00.
2021-05-31 10:39:00 +02:00
Glenn Jocher d833ab3d25 Create is_pip() function (#3391)
Returns `True` if file is part of pip package. Useful for contextual behavior modification.

```python
def is_pip():
    # Is file in a pip package?
    return 'site-packages' in Path(__file__).absolute().parts
```
2021-05-30 20:52:42 +02:00
Glenn Jocher 4b52e19a61 COCO evolution fix (#3388)
* COCO evolution fix

* cleanup

* update print

* print fix
2021-05-29 22:49:34 +02:00
Glenn Jocher ba6f3f974b Enable direct --weights URL definition (#3373)
* Enable direct `--weights URL` definition

@KalenMike this PR will enable direct --weights URL definition. Example use case:
```
python train.py --weights https://storage.googleapis.com/bucket/dir/model.pt
```

* cleanup

* bug fixes

* weights = attempt_download(weights)

* Update experimental.py

* Update hubconf.py

* return bug fix

* comment mirror

* min_bytes
2021-05-28 15:18:44 +02:00
Glenn Jocher 4d4a2b0520 Ignore blank lines in *.txt labels (#3366)
Fix for https://github.com/ultralytics/yolov5/issues/958#issuecomment-849512083
2021-05-27 14:31:26 +02:00
Glenn Jocher 2435bfe896 Add URL download to check_file() (#3330)
* Add URL file download to check_file()

* cleanup

* pathlib bug fix
2021-05-26 15:51:49 +02:00