Commit Graph

1006 Commits (877b826e3af3a0c7fc9da49cff47d57b5993064d)
 

Author SHA1 Message Date
Glenn Jocher 877b826e3a Created using Colaboratory 2021-04-01 11:31:27 +02:00
Glenn Jocher 51cc0962b5
Update README.md 2021-04-01 11:16:56 +02:00
Ayush Chaurasia 2a28ef374b
Set resume flag to false (#2657) 2021-03-31 13:47:54 +02:00
Glenn Jocher 1b475c1797 Created using Colaboratory 2021-03-30 20:07:18 +02:00
Phat Tran 9c803f2f7e
Add --label-smoothing eps argument to train.py (default 0.0) (#2344)
* Add label smoothing option

* Correct data type

* add_log

* Remove log

* Add log

* Update loss.py

remove comment (too versbose)

Co-authored-by: phattran <phat.tranhoang@cyberlogitec.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-29 18:45:46 +02:00
Benjamin Fineran fd1679975b
add option to disable half precision in test.py (#2507)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-29 17:15:26 +02:00
Youngjin Shin 7cdc5165a1
Update requirements.txt (#2564)
* Add opencv-contrib-python to requirements.txt

* Update requirements.txt

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-29 17:05:52 +02:00
Glenn Jocher 1b100cd53e Created using Colaboratory (#2649) 2021-03-29 16:43:37 +02:00
Glenn Jocher 866bc7d640
Speed profiling improvements (#2648)
* Speed profiling improvements

* Update torch_utils.py

deepcopy() required to avoid adding elements to model.

* Update torch_utils.py
2021-03-29 15:19:07 +02:00
zzttqu 1e8ab3f5f2
Add tqdm pbar.close() (#2644)
When using tqdm, sometimes it can't print in one line and roll to next line.
2021-03-29 12:21:25 +02:00
Glenn Jocher 2bf34f50fd
PyTorch Hub amp.autocast() inference (#2641)
I think this should help speed up CUDA inference, as currently models may be running in FP32 inference mode on CUDA devices unnecesarily.
2021-03-28 20:23:40 +02:00
Glenn Jocher ee169834bd
PyTorch Hub custom model to CUDA device fix (#2636)
Fix for #2630 raised by @Pro100rus32
2021-03-28 17:22:00 +02:00
Glenn Jocher 2e95cf3d79
Improve git_describe() fix 1 (#2635)
Add stderr=subprocess.STDOUT to catch error messages.
2021-03-28 17:09:06 +02:00
Ayush Chaurasia 518c09578e
W&B resume ddp from run link fix (#2579)
* W&B resume ddp from run link fix

* Native DDP W&B support for training, resuming
2021-03-28 16:11:36 +02:00
Ayush Chaurasia dc51e80b00
Fix: evolve with wandb (#2634) 2021-03-28 16:09:35 +02:00
Glenn Jocher 6e8c5b7678
Improve git_describe() (#2633)
Catch 'fatal: not a git repository' returns and return '' instead (observed in GCP Hub checks).
2021-03-28 15:39:31 +02:00
Glenn Jocher 9b92d3ee76
FROM nvcr.io/nvidia/pytorch:21.03-py3 (#2623)
Update Docker FROM nvcr.io/nvidia/pytorch:21.03-py3
2021-03-27 18:35:53 +01:00
Glenn Jocher 2dfe32030a
Remove conflicting nvidia-tensorboard package (#2622)
Attempt to resolve tensorboard Docker error in https://github.com/ultralytics/yolov5/issues/2573
2021-03-27 18:31:53 +01:00
Glenn Jocher 005d7a8c54
Update Detections() self.n comment (#2620)
```python
        self.n = len(self.pred)  # number of images (batch size)
```
2021-03-26 21:19:15 +01:00
Ayush Chaurasia 8f6e447729
Fix Indentation in test.py (#2614)
* Fix Indentation in test.py

* CI fix

* Comply with PEP8: 80 characters per line
2021-03-26 20:47:11 +01:00
Glenn Jocher a57f23d18b
Update detections() self.t = tuple() (#2617)
* Update detections() self.t = tuple()

Fix multiple results.print() bug.

* Update experimental.py

* Update yolo.py
2021-03-26 13:23:11 +01:00
Glenn Jocher 0ff5aeca61
Create date_modified() (#2616)
Updated device selection string with fallback for non-git directories.
```python
def select_device(device='', batch_size=None):
    # device = 'cpu' or '0' or '0,1,2,3'
    s = f'YOLOv5 🚀 {git_describe() or date_modified()} torch {torch.__version__} '  # string
...
```
2021-03-26 12:52:47 +01:00
maxupp 196bf10603
Add '*.mpo' to supported image formats (#2615)
Co-authored-by: Max Uppenkamp <max.uppenkamp@inform-software.com>
2021-03-26 12:45:22 +01:00
Glenn Jocher 77415a42e5
Update git_describe() for remote dir usage (#2606) 2021-03-26 01:44:00 +01:00
Glenn Jocher fca16dc4b3
Remove Cython from requirements.txt (#2604)
Cython should be a dependency of the remaining packages in requirements.txt, so should be installed anyway even if not a direct requirement.
2021-03-25 21:48:25 +01:00
Glenn Jocher 3bb414890a
resume.py typo (#2603) 2021-03-25 20:55:20 +01:00
Glenn Jocher d4456e43b2
Update segment2box() comment (#2600) 2021-03-25 15:12:49 +01:00
Glenn Jocher ad05e37d99
Save webcam results, add --nosave option (#2598)
This updates the default detect.py behavior to automatically save all inference images/videos/webcams unless the new argument --nosave is used (python detect.py --nosave) or unless a list of streaming sources is passed (python detect.py --source streams.txt)
2021-03-25 14:09:49 +01:00
Max Kolomeychenko 16206692f2
Supervisely Ecosystem (#2519)
guide describes YOLOv5 apps collection in Supervisely Ecosystem
2021-03-25 00:57:34 +01:00
Glenn Jocher 333ccc5b0f
YOLOv5 PyTorch Hub models >> check_requirements() (#2592)
Improved user-feedback following requirements auto-update.
2021-03-24 17:51:39 +01:00
Glenn Jocher 75feeb797c
YOLOv5 PyTorch Hub models >> check_requirements() (#2591)
Prints 'Please restart runtime or rerun command for update to take effect.' following package auto-install to inform users to restart/rerun.
2021-03-24 16:42:54 +01:00
Glenn Jocher 8ace1b1b99
YOLOv5 PyTorch Hub models >> check_requirements() (#2588)
* YOLOv5 PyTorch Hub models >> check_requirements()

Update YOLOv5 PyTorch Hub requirements.txt path to cache path.

* Update hubconf.py
2021-03-24 16:23:54 +01:00
Glenn Jocher 9f98201dd9
W&B DDP fix 2 (#2587)
Revert unintentional change to test batch sizes caused by PR https://github.com/ultralytics/yolov5/pull/2125
2021-03-24 15:43:32 +01:00
Glenn Jocher 2bcc89d762
YOLOv5 PyTorch Hub models >> check_requirements() (#2577)
* Update hubconf.py with check_requirements()

Dependency checks have been missing from YOLOv5 PyTorch Hub model loading, causing errors in some cases when users are attempting to import hub models in unsupported environments. This should examine the YOLOv5 requirements.txt file and pip install any missing or version-conflict packages encountered. 

This is highly experimental (!), please let us know if this creates problems in your custom workflows.

* Update hubconf.py
2021-03-24 15:42:00 +01:00
Glenn Jocher e5b0200cd2
Update tensorboard>=2.4.1 (#2576)
* Update tensorboard>=2.4.1 

Update tensorboard version to attempt to address https://github.com/ultralytics/yolov5/issues/2573 (tensorboard logging fail in Docker image).

* cleanup
2021-03-24 01:29:00 +01:00
Glenn Jocher 2b329b0945
Enhanced check_requirements() with auto-install (#2575)
* Update check_requirements() with auto-install

This PR builds on an idea I had to automatically install missing dependencies rather than simply report an error message. 

YOLOv5 should now 1) display all dependency issues and not simply display the first missing dependency, and 2) attempt to install/update each missing/VersionConflict package.

* cleanup

* cleanup 2

* Check requirements.txt file exists

* cleanup 3
2021-03-24 01:05:59 +01:00
Ayush Chaurasia 1bf9365280
W&B DDP fix (#2574) 2021-03-23 16:54:34 +01:00
Glenn Jocher 0d891c601e
check_requirements() exclude pycocotools, thop (#2571)
Exclude non-critical packages from dependency checks in detect.py. pycocotools and thop in particular are not required for inference.

Issue first raised in https://github.com/ultralytics/yolov5/issues/1944 and also raised in https://github.com/ultralytics/yolov5/discussions/2556
2021-03-23 14:25:55 +01:00
Glenn Jocher 1c132a1f94
Update Detections() times=None (#2570)
Fix for results.tolist() method breaking after YOLOv5 Hub profiling PRshttps://github.com/ultralytics/yolov5/pull/2460 https://github.com/ultralytics/yolov5/pull/2459 and
2021-03-23 14:10:47 +01:00
Ayush Chaurasia e8fc97aa38
Improved W&B integration (#2125)
* Init Commit

* new wandb integration

* Update

* Use data_dict in test

* Updates

* Update: scope of log_img

* Update: scope of log_img

* Update

* Update: Fix logging conditions

* Add tqdm bar, support for .txt dataset format

* Improve Result table Logger

* Init Commit

* new wandb integration

* Update

* Use data_dict in test

* Updates

* Update: scope of log_img

* Update: scope of log_img

* Update

* Update: Fix logging conditions

* Add tqdm bar, support for .txt dataset format

* Improve Result table Logger

* Add dataset creation in training script

* Change scope: self.wandb_run

* Add wandb-artifact:// natively

you can now use --resume with wandb run links

* Add suuport for logging dataset while training

* Cleanup

* Fix: Merge conflict

* Fix: CI tests

* Automatically use wandb config

* Fix: Resume

* Fix: CI

* Enhance: Using val_table

* More resume enhancement

* FIX : CI

* Add alias

* Get useful opt config data

* train.py cleanup

* Cleanup train.py

* more cleanup

* Cleanup| CI fix

* Reformat using PEP8

* FIX:CI

* rebase

* remove uneccesary changes

* remove uneccesary changes

* remove uneccesary changes

* remove unecessary chage from test.py

* FIX: resume from local checkpoint

* FIX:resume

* FIX:resume

* Reformat

* Performance improvement

* Fix local resume

* Fix local resume

* FIX:CI

* Fix: CI

* Imporve image logging

* (:(:Redo CI tests:):)

* Remember epochs when resuming

* Remember epochs when resuming

* Update DDP location

Potential fix for #2405

* PEP8 reformat

* 0.25 confidence threshold

* reset train.py plots syntax to previous

* reset epochs completed syntax to previous

* reset space to previous

* remove brackets

* reset comment to previous

* Update: is_coco check, remove unused code

* Remove redundant print statement

* Remove wandb imports

* remove dsviz logger from test.py

* Remove redundant change from test.py

* remove redundant changes from train.py

* reformat and improvements

* Fix typo

* Add tqdm tqdm progress when scanning files, naming improvements

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-23 00:44:50 +01:00
Glenn Jocher ed2c74218d Created using Colaboratory 2021-03-14 23:32:39 -07:00
Glenn Jocher 9b11f0c58b
PyTorch Hub models default to CUDA:0 if available (#2472)
* PyTorch Hub models default to CUDA:0 if available

* device as string bug fix
2021-03-14 23:16:17 -07:00
Glenn Jocher 2d41e70e82
Scipy kmeans-robust autoanchor update (#2470)
Fix for https://github.com/ultralytics/yolov5/issues/2394
2021-03-14 21:58:12 -07:00
Yann Defretin 38ff499b26
Update autosplit() with annotated_only option (#2466)
* Be able to create dataset from annotated images only

Add the ability to create a dataset/splits only with images that have an annotation file, i.e a .txt file, associated to it. As we talked about this, the absence of a txt file could mean two things:

* either the image wasn't yet labelled by someone,
* either there is no object to detect.

When it's easy to create small datasets, when you have to create datasets with thousands of images (and more coming), it's hard to track where you at and you don't want to wait to have all of them annotated before starting to train. Which means some images would lack txt files and annotations, resulting in label inconsistency as you say in #2313. By adding the annotated_only argument to the function, people could create, if they want to, datasets/splits only with images that were labelled, for sure.

* Cleanup and update print()

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-14 17:11:27 -07:00
Glenn Jocher 6f718cee74 Created using Colaboratory 2021-03-13 20:20:09 -08:00
Glenn Jocher 20d879db36
Update tutorial.ipynb 2021-03-13 20:05:21 -08:00
Glenn Jocher f813f6dcc8
autoShape() speed profiling update (#2460) 2021-03-13 20:00:03 -08:00
Glenn Jocher 569757ecc0
Add autoShape() speed profiling (#2459)
* Add autoShape() speed profiling

* Update common.py

* Create README.md

* Update hubconf.py

* cleanuip
2021-03-13 19:50:34 -08:00
Glenn Jocher 747c2653ee
CVPR 2021 Argoverse-HD autodownload curl (#2455)
curl preferred over wget for slightly better cross platform compatibility (i.e. out of the box macos compatible).
2021-03-12 22:27:53 -08:00
Glenn Jocher 08d4918d7f
labels.jpg class names (#2454)
* labels.png class names

* fontsize=10
2021-03-12 22:15:41 -08:00