Glenn Jocher
47fac9ff73
Update train.py comment to 'Model attributes' ( #5670 )
3 years ago
Werner Duvaud
09d170381c
Default DataLoader `shuffle=True` for training ( #5623 )
* Fix shuffle DataLoader argument
* Add shuffle argument
* Disable shuffle when rect
* Cleanup, add rect warning
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Cleanup2
* Cleanup3
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3 years ago
Glenn Jocher
7473f0f95d
DDP `WORLD_SIZE`-safe dataloader workers ( #5631 )
* WORLD_SIZE-safe workers
* Update with DDP comment
3 years ago
Glenn Jocher
61c50199a2
Update train, val `tqdm` to fixed width ( #5367 )
* Update tqdm for fixed width
* Update val.py
* Update val.py
* Try ncols= in train.py
* NCOLS
* NCOLS
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* bar_format
* position 0 leave true
* exp0
* auto
* auto
* Cleanup
* Cleanup
* Cleanup
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3 years ago
Glenn Jocher
79bca2bf64
`LOGGER` consolidation ( #5569 )
* Logger consolidation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3 years ago
Glenn Jocher
e189fa15ea
`intersect_dicts()` in hubconf.py fix ( #5542 )
3 years ago
Glenn Jocher
bcc085d83f
Common `is_coco` logic betwen train.py and val.py ( #5521 )
3 years ago
Yonghye Kwon
99a45bad81
Write date in checkpoint file ( #5514 )
* write date in checkpoint file
write date in checkpoint file
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* isoformat
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Jirka Borovec
0155548384
precommit: isort ( #5493 )
* precommit: isort
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update isort config
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update name
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
5866646cc8
Fix float zeros format ( #5491 )
* Fix float zeros format
* 255 to integer
3 years ago
Glenn Jocher
7b1f7aec46
Update `get_loggers()` ( #4854 )
* Update `set_logging()`
* Update export.py
* pre-commit fixes
* Update LoadImages
* Update LoadStreams
* Update print_args
* Single LOGGER definition
* yolo.py fix
Co-authored-by: pre-commit <pre-commit@example.com>
3 years ago
Glenn Jocher
a4fece8c14
DDP `nl` fix ( #5332 )
3 years ago
Glenn Jocher
ca19df5f7f
Add `autobatch` feature for best `batch-size` estimation ( #5092 )
* Autobatch
* fix mem
* fix mem2
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update train.py
* print result
* Cleanup print result
* swap fix in call
* to 64
* use total
* fix
* fix
* fix
* fix
* fix
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Cleanup printing
* Update final printout
* Update autobatch.py
* Update autobatch.py
* Update autobatch.py
3 years ago
Glenn Jocher
752d97df2c
Add `on_fit_epoch_end` callback ( #5232 )
* Add `on_fit_epoch_end` callback
* Add results to train
* Update __init__.py
3 years ago
Malte Lorbach
153873e9e4
Fix `ROOT` as relative path ( #5129 )
* 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>
3 years ago
Nan
4a6dfffdaa
Pass `LOCAL_RANK` to `torch_distributed_zero_first()` ( #5114 )
Co-authored-by: qiningonline <qiningonline@gmail.com>
3 years ago
Glenn Jocher
070af88108
Fix `yaml.safe_load()` ignore emoji errors ( #5060 )
3 years ago
Glenn Jocher
5afc9c25ef
Implement `--save-period` locally ( #5047 )
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.
3 years ago
Zhiqiang Wang
1922ddeac0
Fix pylint: do not use bare 'except' ( #5025 )
* Fix E722, do not use bare 'except'
* Remove used codes
* Add FileNotFoundError in LoadImagesAndLabels
* Remove AssertionError
* Ignore LoadImagesAndLabels
* Ignore downloads.py
* Ignore torch_utils.py
* Ignore train.py
* Ignore datasets.py
* Enable utils/download.py
* Fixing exception in thop
* Remove unused code
* Fixing exception in LoadImagesAndLabels
* Fixing exception in exif_size
* Fixing exception in parse_model
* Ignore exceptions in requests
* Revert the exception as suggested
* Revert the exception as suggested
3 years ago
Glenn Jocher
89a6e9ffa7
Compute loss on final val ( #5017 )
3 years ago
Glenn Jocher
452e84703c
Update train.py ( #5014 )
3 years ago
Glenn Jocher
4e04cb0dc8
Allow YOLOv5 execution from arbitrary `cwd` ( #4954 )
* Allow YOLOv5 execution from arbitrary `cwd`
* Fix str bugs
3 years ago
Glenn Jocher
d856c48298
Validate `best.pt` on train end ( #4889 )
* 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
3 years ago
Glenn Jocher
2b3109eeb0
Fix DDP destruction `LOGGER.info()` ( #4863 )
3 years ago
Glenn Jocher
4c839eeb10
Simplify `check_requirements()` usage ( #4855 )
* Simplify `check_requirements()` usage
* remove assert, print()
3 years ago
Glenn Jocher
4d1a2ac87e
Update `sys.path.append(str(ROOT))` ( #4852 )
* Update `sys.path.append(str(ROOT))`
* Cleanup
3 years ago
Glenn Jocher
3732f9ac8a
Refactor argparser printing to `print_args()` ( #4850 )
* Refactor argparser printing to `print_args()`
* Cleanup
3 years ago
Glenn Jocher
621b6d5ba8
Evolution `--resume` fix ( #4802 )
Also disable `/weights` dir creation when evolving as no weights are saved and empty folder causes user expectations of weights.
3 years ago
Glenn Jocher
c47be26f34
Replace `path.absolute()` with `path.resolve()` ( #4763 )
3 years ago
Glenn Jocher
c5360f6e70
Fix `--data from_HUB.zip` ( #4732 )
@KalenMike
3 years ago
Glenn Jocher
a2b3c71636
Add suffix checks ( #4711 )
* Add suffix checks
* Cleanup
* Cleanup2
* Cleanup3
3 years ago
Kalen Michael
2317f86ca4
Optimised Callback Class to Reduce Code and Fix Errors ( #4688 )
* added callbacks
* added back callback to main
* added save_dir to callback output
* reduced code count
* updated callbacks
* added default callback class to main, added missing parameters to on_model_save
* Glenn updates
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
548745181a
EarlyStopper updates ( #4679 )
3 years ago
imyhxy
f64fab5825
Fixed 'meta' and 'hyp' may out of order when using evolve ( #4657 )
* Fixed 'meta' and 'hyp' may out of order when using evolve
* Update gitignore
3 years ago
Glenn Jocher
50a9828679
DDP `torch.jit.trace()` `--sync-bn` fix ( #4615 )
* Remove assert
* debug0
* trace=not opt.sync
* sync to sync_bn fix
* Cleanup
3 years ago
Glenn Jocher
de44376d1b
Create `Annotator()` class ( #4591 )
* Add Annotator() class
* Download Arial
* 2x for loop
* Cleanup
* tuple 2 list
* max_size=1920
* bold logging results to
* tolist()
* im = annotator.im
* PIL save in detect.py
* Smart asarray in detect.py
* revert to cv2.imwrite
* Cleanup
* Return result asarray
* Add `Profile()` profiler
* CamelCase Timeout
* Resize after mosaic
* pillow>=8.0.0
* daemon imwrite
* Add cv2 support
* Remove plot_wh_methods and plot_one_box
* pil=False for hubconf.py annotations
* im.shape bug fix
* colorstr common.py
* join daemons
* Update t.daemon
* Removed daemon saving
3 years ago
Glenn Jocher
d7aa3f153d
Remove `image_weights` DDP code ( #4579 )
* Initial commit
* Update
3 years ago
Glenn Jocher
93cc015748
Add EarlyStopping feature ( #4576 )
* Add EarlyStopping feature
* Add comment
* Cleanup
* Cleanup2
* debug
* debug2
* debug3
* debug3
* debug4
* debug5
* debug6
* debug7
* debug8
* debug9
* debug10
* debug11
* debug12
* Cleanup
* Add TODO for known DDP issue
3 years ago
Glenn Jocher
19d03a955c
Remove DDP process group timeout ( #4422 )
3 years ago
Glenn Jocher
24bea5e4b7
Standardize headers and docstrings ( #4417 )
* Implement new headers
* Reformat 1
* Reformat 2
* Reformat 3 - math
* Reformat 4 - yaml
3 years ago
Glenn Jocher
ce7deec440
`int(mlc)` ( #4385 )
3 years ago
Glenn Jocher
86c7150cfd
Update newline ( #4308 )
3 years ago
Glenn Jocher
e78aeac973
Evolve in CSV format ( #4307 )
* Update evolution to CSV format
* Update
* Update
* Update
* Update
* Update
* reset args
* reset args
* reset args
* plot_results() fix
* Cleanup
* Cleanup2
3 years ago
junji hashimoto
2d99063201
Feature `python train.py --cache disk` ( #4049 )
* Add cache-on-disk and cache-directory to cache images on disk
* Fix load_image with cache_on_disk
* Add no_cache flag for load_image
* Revert the parts('logging' and a new line) that do not need to be modified
* Add the assertion for shapes of cached images
* Add a suffix string for cached images
* Fix boundary-error of letterbox for load_mosaic
* Add prefix as cache-key of cache-on-disk
* Update cache-function on disk
* Add psutil in requirements.txt
* Update train.py
* Cleanup1
* Cleanup2
* Skip existing npy
* Include re-space
* Export return character fix
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Kalen Michael
b74929c910
Add `train.py` and `val.py` callbacks ( #4220 )
* added callbacks
* Update callbacks.py
* Update train.py
* Update val.py
* Fix CamlCase add staticmethod
* Refactor logger into callbacks
* Cleanup
* New callback on_val_image_end()
* Add curves and results images to TensorBoard
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
IneovaAI
bceb57b910
Add `python train.py --freeze N` argument ( #4238 )
* Add freeze as an argument
I train on different platforms and sometimes I want to freeze some layers. I have to go into the code and change it and also keep track of how many layers I froze on what platform. Please add the number of layers to freeze as an argument in future versions thanks.
* Update train.py
* Update train.py
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
8d3c3ef45c
Fix weight decay comment ( #4228 )
3 years ago
Glenn Jocher
c2c958c350
Explicit `requirements.txt` location ( #4225 )
3 years ago
Glenn Jocher
b60b62e874
PyCharm reformat ( #4209 )
* PyCharm reformat
* YAML reformat
* Markdown reformat
3 years ago
Ayush Chaurasia
e88e8f7a98
W&B: Restructure code to support the new dataset_check() feature ( #4197 )
* Improve docstrings and run names
* default wandb login prompt with timeout
* return key
* Update api_key check logic
* Properly support zipped dataset feature
* update docstring
* Revert tuorial change
* extend changes to log_dataset
* add run name
* bug fix
* bug fix
* Update comment
* fix import check
* remove unused import
* Hardcore .yaml file extension
* reduce code
* Reformat using pycharm
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago