* Autofix duplicate labels
PR changes duplicate label handling from report error and ignore image-label pair to report warning and autofix image-label pair.
This should fix this common issue for users and allow everyone to get started and get a model trained faster and easier than before.
* sign fix
* Cleanup
* Increment cache version
* all to any fix
* Update Objects365.yaml
Download the official Objects365 validation set and convert the labels
* Enforce 4-space indent, reformat and cleanup
* shorten list comprehension
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Add train class filter feature to datasets.py
Allows for training on a subset of total classes if `include_class` list is defined on datasets.py L448:
```python
include_class = [] # filter labels to include only these classes (optional)
```
* segments fix
* update detect.py in order to support torch script
This change assumes the torchscrip file was previously saved with `export.py`
* update `detect.py` for torchscript support
Simple update for torchscript support. Assumes the torchscript file has been generated with `export.py`
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* use os.path.relpath instead of relative_to
* use os.path.relpath instead of relative_to
* Remove os.path from val.py
* Remove os.path from train.py
* Update detect.py import to os
* Update export.py import to os
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* fix different devices bug
* extend _apply() instead of to() for a general fix
* Only apply if Detect() is last layer
Co-authored-by: Jebastin Nadar <njebastin10@gmail.com>
* Indent fix
* Add comment to yolo.py
* Add comment to common.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Requirements updated
1. Requests added to requirements.txt. That might not be included in all docker base images, adding it to the requirements is safer.
2. Added a minimum version to Pandas. It's a good practice to have versions for all dependencies.
* Sort alphabetically
* Update requirements.txt
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This PR adds a new training argument `--save-period` to save training checkpoints every `x` epochs. To save training every 50 epochs for example:
```
python train.py --save-period 50 # saves epoch50.pt, epoch100.pt, epoch150.pt, ... etc.
```
This saved checkpoints in addition to existing last.pt and best.pt checkpoints and does not affect their behavior. Default value is -1, i.e. disabled.
* added callbacks
* added back callback to main
* added save_dir to callback output
* merged in upstream
* removed ghost code
* fixed parsing error for google temp links
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Temporarily reverts https://github.com/ultralytics/yolov5/pull/4978 until torch 1.10 is released, which should resolve `urllib.error.HTTPError: HTTP Error 403: rate limit exceeded` errors generated by torch hub from GitHub actions runners.