* 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.
`check_file()` is now limited to searching opt-in directories: /data, /models, /utils. This prevents large non-project directories like /.git and /venv from being searched, which may cause `check_file()` to slow significantly.
* Validate best.pt on train end
* 0.7 iou for COCO only
* pass callbacks
* active model.float() if not half
* print Validating best.pt...
* add newline