Ayush Chaurasia
b73c62ebc5
W&B: Remember batchsize on resuming ( #6512 )
...
* log best.pt metrics at train end
* update
* Update __init__.py
* flush callbacks when using evolve
* remember batch size on resuming
* Update train.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-02-03 11:29:52 +01:00
Matthias
8efe97719c
Add `stop_training=False` flag to callbacks ( #6365 )
...
* New flag 'stop_training' in util.callbacks.Callbacks class to prematurely stop training from callback handler
* Removed most of the new checks, leaving only the one after calling 'on_train_batch_end'
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-01-22 16:37:21 -10:00
Ayush Chaurasia
9bcc32a5bf
Flush callbacks when on `--evolve` ( #6374 )
...
* log best.pt metrics at train end
* update
* Update __init__.py
* flush callbacks when using evolve
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-01-20 13:22:47 -10:00
Otfot
db1f83be63
Fix `train.py` parameter groups desc error ( #6318 )
...
* Fix `train.py` parameter groups desc error
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-01-16 20:58:34 -10:00
Glenn Jocher
33a67b4918
Update P2-P7 `models/hub` variants ( #6230 )
...
* Update p2-p7 `models/hub` variants
* Update common.py
* AutoAnchor camelcase corrections
2022-01-06 11:08:09 -08:00
Glenn Jocher
ec4b6dd2a3
Update export format docstrings ( #6151 )
...
* Update export documentation
* Cleanup
* Update export.py
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update README.md
* Update README.md
* Update README.md
* Update train.py
* Update train.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-02 16:09:45 -08:00
bilzard
e1dc894364
Enable AdamW optimizer ( #6152 )
2022-01-02 13:10:19 -08:00
Ayush Chaurasia
db6ec66a60
W&B: track batch size after autobatch ( #6039 )
...
* track batch size after autobatch
* remove redundant import
* Update __init__.py
* Update __init__.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-23 14:23:50 +01:00
Glenn Jocher
dc54ed5763
`--freeze` fix ( #6044 )
...
Fix for https://github.com/ultralytics/yolov5/issues/6038
2021-12-20 18:24:07 +01:00
Felix You
361705d9be
Multi-layer capable `--freeze` argument ( #6019 )
...
* support specfiy multiple frozen layers
* fix bug
* Cleanup Freeze section
* Cleanup argument
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-17 15:42:26 +01:00
Glenn Jocher
7c6bae0ae6
Remove NCOLS from tqdm ( #5804 )
...
* Remove NCOLS from tqdm
* [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>
2021-11-26 13:37:28 +01:00
Ayush Chaurasia
f2ca30a407
W&B: refactor W&B tables ( #5737 )
...
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* reformat
* Single-line argparser argument
* Update README.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update README.md
* [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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-25 17:19:21 +01:00
Glenn Jocher
4ca4aec46f
Do not save hyp.yaml and opt.yaml on evolve ( #5775 )
...
* Do not save hyp.yaml and opt.yaml on evolve
* Update general.py
2021-11-24 23:25:51 +01:00
Glenn Jocher
47fac9ff73
Update train.py comment to 'Model attributes' ( #5670 )
2021-11-16 13:58:15 +01:00
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>
2021-11-13 13:07:32 +01:00
Glenn Jocher
7473f0f95d
DDP `WORLD_SIZE`-safe dataloader workers ( #5631 )
...
* WORLD_SIZE-safe workers
* Update with DDP comment
2021-11-12 14:48:55 +01:00
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>
2021-11-10 15:47:38 +01:00
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>
2021-11-08 16:32:15 +01:00
Glenn Jocher
e189fa15ea
`intersect_dicts()` in hubconf.py fix ( #5542 )
2021-11-06 15:41:17 +01:00
Glenn Jocher
bcc085d83f
Common `is_coco` logic betwen train.py and val.py ( #5521 )
2021-11-05 13:32:46 +01:00
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>
2021-11-05 11:48:10 +01:00
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>
2021-11-04 17:24:25 +01:00
Glenn Jocher
5866646cc8
Fix float zeros format ( #5491 )
...
* Fix float zeros format
* 255 to integer
2021-11-03 23:36:53 +01:00
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>
2021-11-01 18:22:13 +01:00
Glenn Jocher
a4fece8c14
DDP `nl` fix ( #5332 )
2021-10-25 16:03:39 +02:00
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
2021-10-25 13:56:13 +02:00
Glenn Jocher
752d97df2c
Add `on_fit_epoch_end` callback ( #5232 )
...
* Add `on_fit_epoch_end` callback
* Add results to train
* Update __init__.py
2021-10-18 14:28:22 +02:00
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>
2021-10-11 09:47:24 -07:00
Nan
4a6dfffdaa
Pass `LOCAL_RANK` to `torch_distributed_zero_first()` ( #5114 )
...
Co-authored-by: qiningonline <qiningonline@gmail.com>
2021-10-09 18:41:50 -07:00
Glenn Jocher
070af88108
Fix `yaml.safe_load()` ignore emoji errors ( #5060 )
2021-10-05 13:41:52 -07:00
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.
2021-10-04 18:48:46 -07:00
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
2021-10-03 17:54:40 -07:00
Glenn Jocher
89a6e9ffa7
Compute loss on final val ( #5017 )
2021-09-30 15:16:11 -07:00
Glenn Jocher
452e84703c
Update train.py ( #5014 )
2021-09-30 13:57:53 -07:00
Glenn Jocher
4e04cb0dc8
Allow YOLOv5 execution from arbitrary `cwd` ( #4954 )
...
* Allow YOLOv5 execution from arbitrary `cwd`
* Fix str bugs
2021-09-27 17:40:20 -07:00
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
2021-09-26 11:54:53 -07:00
Glenn Jocher
2b3109eeb0
Fix DDP destruction `LOGGER.info()` ( #4863 )
2021-09-20 13:12:48 +02:00
Glenn Jocher
4c839eeb10
Simplify `check_requirements()` usage ( #4855 )
...
* Simplify `check_requirements()` usage
* remove assert, print()
2021-09-18 18:34:30 +02:00
Glenn Jocher
4d1a2ac87e
Update `sys.path.append(str(ROOT))` ( #4852 )
...
* Update `sys.path.append(str(ROOT))`
* Cleanup
2021-09-18 15:02:08 +02:00
Glenn Jocher
3732f9ac8a
Refactor argparser printing to `print_args()` ( #4850 )
...
* Refactor argparser printing to `print_args()`
* Cleanup
2021-09-18 14:16:19 +02:00
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.
2021-09-15 13:13:33 +02:00
Glenn Jocher
c47be26f34
Replace `path.absolute()` with `path.resolve()` ( #4763 )
2021-09-11 22:46:33 +02:00
Glenn Jocher
c5360f6e70
Fix `--data from_HUB.zip` ( #4732 )
...
@KalenMike
2021-09-09 18:01:59 +02:00
Glenn Jocher
a2b3c71636
Add suffix checks ( #4711 )
...
* Add suffix checks
* Cleanup
* Cleanup2
* Cleanup3
2021-09-08 14:36:12 +02:00
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>
2021-09-07 18:32:15 +02:00
Glenn Jocher
548745181a
EarlyStopper updates ( #4679 )
2021-09-05 19:09:53 +02:00
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
2021-09-05 17:43:09 +02:00
Glenn Jocher
50a9828679
DDP `torch.jit.trace()` `--sync-bn` fix ( #4615 )
...
* Remove assert
* debug0
* trace=not opt.sync
* sync to sync_bn fix
* Cleanup
2021-08-30 18:35:07 +02:00
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
2021-08-29 16:46:13 +02:00
Glenn Jocher
d7aa3f153d
Remove `image_weights` DDP code ( #4579 )
...
* Initial commit
* Update
2021-08-28 19:17:21 +02:00
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
2021-08-28 19:03:52 +02:00
Glenn Jocher
19d03a955c
Remove DDP process group timeout ( #4422 )
2021-08-15 18:32:41 +02:00
Glenn Jocher
24bea5e4b7
Standardize headers and docstrings ( #4417 )
...
* Implement new headers
* Reformat 1
* Reformat 2
* Reformat 3 - math
* Reformat 4 - yaml
2021-08-14 21:17:51 +02:00
Glenn Jocher
ce7deec440
`int(mlc)` ( #4385 )
2021-08-11 17:32:13 +02:00
Glenn Jocher
86c7150cfd
Update newline ( #4308 )
2021-08-04 17:41:38 +02:00
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
2021-08-04 17:13:38 +02:00
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>
2021-08-02 18:47:24 +02:00
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>
2021-08-01 00:18:07 +02:00
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>
2021-07-30 17:39:48 +02:00
Glenn Jocher
8d3c3ef45c
Fix weight decay comment ( #4228 )
2021-07-30 01:35:39 +02:00
Glenn Jocher
c2c958c350
Explicit `requirements.txt` location ( #4225 )
2021-07-29 17:29:39 +02:00
Glenn Jocher
b60b62e874
PyCharm reformat ( #4209 )
...
* PyCharm reformat
* YAML reformat
* Markdown reformat
2021-07-28 23:35:14 +02:00
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>
2021-07-28 17:40:08 +02:00
Glenn Jocher
5d66e48723
Train from `--data path/to/dataset.zip` feature ( #4185 )
...
* Train from `--data path/to/dataset.zip` feature
* Update dataset_stats()
* cleanup
* cleanup2
2021-07-28 02:04:10 +02:00
Glenn Jocher
0ad6301c96
Update script headers ( #4163 )
...
* Update download script headers
* cleanup
* bug fix attempt
* bug fix attempt2
* bug fix attempt3
* cleanup
2021-07-26 15:23:33 +02:00
Glenn Jocher
96e36a7c91
New CSV Logger ( #4148 )
...
* New CSV Logger
* cleanup
* move batch plots into Logger
* rename comment
* Remove total loss from progress bar
* mloss :-1 bug fix
* Update plot_results()
* Update plot_results()
* plot_results bug fix
2021-07-25 19:06:37 +02:00
Glenn Jocher
efe60b5681
Refactor train.py and val.py `loggers` ( #4137 )
...
* Update loggers
* Config
* Update val.py
* cleanup
* fix1
* fix2
* fix3 and reformat
* format sweep.py
* Logger() class
* cleanup
* cleanup2
* wandb package import fix
* wandb package import fix2
* txt fix
* fix4
* fix5
* fix6
* drop wandb into utils/loggers
* fix 7
* rename loggers/wandb_logging to loggers/wandb
* Update message
* Update message
* Update message
* cleanup
* Fix x axis bug
* fix rank 0 issue
* cleanup
2021-07-25 01:18:39 +02:00
Glenn Jocher
63dd65e7ed
Update train.py ( #4136 )
...
* Refactor train.py
* Update imports
* Update imports
* Update optimizer
* cleanup
2021-07-24 16:11:39 +02:00
Glenn Jocher
2c073cd207
Add train.py ``--img-size` floor ( #4099 )
2021-07-21 16:50:47 +02:00
Glenn Jocher
f7d8562060
`val.py` refactor ( #4053 )
...
* val.py refactor
* cleanup
* cleanup
* cleanup
* cleanup
* save after eval
* opt.imgsz bug fix
* wandb refactor
* dataloader to train_loader
* capitalize global variables
* runs/hub/exp to runs/detect/exp
* refactor wandb logging
* Refactor wandb operations (#4061 )
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
2021-07-19 10:43:01 +02:00
Glenn Jocher
951922c735
Add `--sync-bn` known issue ( #4032 )
...
* Add `--sync-bn` known issue
* Update train.py
2021-07-17 13:07:19 +02:00
Glenn Jocher
720aaa65c8
Rename `test.py` to `val.py` ( #4000 )
2021-07-14 15:43:54 +02:00
Eldar Kurtic
e7888af94c
Fix inconsistent NMS IoU value for COCO ( #3934 )
...
Evaluation of 'best' and 'last' models will use the same params as the evaluation during the training phase.
This PR fixes https://github.com/ultralytics/yolov5/issues/3907
2021-07-08 15:29:02 +02:00
Glenn Jocher
8930e22cce
Evolution commented `hyp['anchors']` fix ( #3887 )
...
Fix for `KeyError: 'anchors'` error when start hyperparameter evolution:
```bash
python train.py --evolve
```
```bash
Traceback (most recent call last):
File "E:\yolov5\train.py", line 623, in <module>
hyp[k] = max(hyp[k], v[1]) # lower limit
KeyError: 'anchors'
```
2021-07-05 12:48:27 +02:00
san-soucie
d3e9d69850
`--evolve 300` generations CLI argument ( #3863 )
...
* evolve command accepts argument for number of generations
* evolve generations argument used in evolve for loop
* evolve argument boolean fixes
* default to 300 evolve generations
* Update train.py
Co-authored-by: John San Soucie <jsansoucie@whoi.edu>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-04 12:14:35 +02:00
Glenn Jocher
c6c88dc601
Copy-Paste augmentation for YOLOv5 ( #3845 )
...
* Copy-paste augmentation initial commit
* if any segments
* Add obscuration rejection
* Add copy_paste hyperparameter
* Update comments
2021-07-01 00:35:04 +02:00
yellowdolphin
3974d725b6
Fix warmup `accumulate` ( #3722 )
...
* gradient accumulation during warmup in train.py
Context:
`accumulate` is the number of batches/gradients accumulated before calling the next optimizer.step().
During warmup, it is ramped up from 1 to the final value nbs / batch_size.
Although I have not seen this in other libraries, I like the idea. During warmup, as grads are large, too large steps are more of on issue than gradient noise due to small steps.
The bug:
The condition to perform the opt step is wrong
> if ni % accumulate == 0:
This produces irregular step sizes if `accumulate` is not constant. It becomes relevant when batch_size is small and `accumulate` changes many times during warmup.
This demo also shows the proposed solution, to use a ">=" condition instead:
https://colab.research.google.com/drive/1MA2z2eCXYB_BC5UZqgXueqL_y1Tz_XVq?usp=sharing
Further, I propose not to restrict the number of warmup iterations to >= 1000. If the user changes hyp['warmup_epochs'], this causes unexpected behavior. Also, it makes evolution unstable if this parameter was to be optimized.
* replace last_opt_step tracking by do_step(ni)
* add docstrings
* move down nw
* Update train.py
* revert math import move
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-28 12:25:13 +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
Piotr Skalski
09246a5a33
fix/incorrect_fitness_import ( #3770 )
2021-06-25 16:16:18 +02:00
Glenn Jocher
f2d97ebb25
Remove DDP MultiHeadAttention fix ( #3768 )
2021-06-25 12:52:05 +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
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
Ayush Chaurasia
75c0ff43af
[x]W&B: Don't resume transfer learning runs ( #3604 )
...
* Allow config cahnge
* Allow val change in wandb config
* Don't resume transfer learning runs
* Add entity in log dataset
2021-06-21 14:00:25 +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
lb-desupervised
bfb2276b1d
Slightly modify CLI execution ( #3687 )
...
* Slightly modify CLI execution
This simple change makes it easier to run the primary functions of this
repo (train/detect/test) from within Python. An object which represents
`opt` can be constructed and fed to the `main` function of each of these
modules, rather than having to call the lower level functions directly,
or run the module as a script.
* Update export.py
Add CLI parsing update for more convenient module usage within Python.
Co-authored-by: Lewis Belcher <lb@desupervised.io>
2021-06-19 12:06:59 +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
Wei Quan
4c5d9bff80
Fix incorrect end epoch comment ( #3612 )
2021-06-15 11:24:56 +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
4695ca8314
Refactoring cleanup ( #3565 )
...
* Refactoring cleanup
* Update test.py
2021-06-09 22:50:27 +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
63157d214d
Remove `is_coco` argument from `test()` ( #3553 )
2021-06-09 15:09:51 +02:00