Glenn Jocher
9e75cbf4c1
Update __init__.py ( #7065 )
2022-03-20 18:17:04 +01:00
Glenn Jocher
e278fd63ec
Update W&B message to `LOGGER.info()` ( #7064 )
2022-03-20 18:15:22 +01:00
Glenn Jocher
f327eee614
Fix `check_anchor_order()` in pixel-space not grid-space ( #7060 )
...
* Update `check_anchor_order()`
Use mean area per output layer for added stability.
* Check in pixel-space not grid-space fix
2022-03-20 16:27:51 +01:00
Philip Gutjahr
529fbc1814
Use PIL to eliminate chroma subsampling in crops ( #7008 )
...
* use pillow to save higher-quality jpg (w/o color subsampling)
* Cleanup and doc issue
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-20 15:46:29 +01:00
Glenn Jocher
9f4d11379b
Fix incomplete URL substring sanitation ( #7056 )
...
Resolves code scanning alert in https://github.com/ultralytics/yolov5/issues/7055
2022-03-20 14:18:05 +01:00
Glenn Jocher
b0ba101ac0
`ComputeLoss()` indexing/speed improvements ( #7048 )
...
* device as class attribute
* Update loss.py
* Update loss.py
* improve zeros
* tensor split
2022-03-20 01:04:48 +01:00
Max Strobel
7c6a33564a
fix: add default PIL font as fallback ( #7010 )
...
* fix: add default font as fallback
Add default font as fallback if the downloading of the Arial.ttf font
fails for some reason, e.g. no access to public internet.
* Update plots.py
Co-authored-by: Maximilian Strobel <Maximilian.Strobel@infineon.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-17 16:37:09 +01:00
Glenn Jocher
3f634d43c8
Conditional `Timeout()` by OS (disable on Windows) ( #7013 )
...
* Conditional `Timeout()` by OS (disable on Windows)
* Update general.py
2022-03-16 15:33:54 +01:00
Glenn Jocher
c09fb2aa95
Update TQDM bar format ( #6988 )
2022-03-15 16:32:56 +01:00
Glenn Jocher
932dc78496
YOLOv5 Export Benchmarks for GPU ( #6963 )
...
* Add benchmarks.py GPU support
* Updates
* Updates
* Updates
* Updates
* Add --half
* Add TRT requirements
* Cleanup
* Add TF to warmup types
* Update export.py
* Update export.py
* Update benchmarks.py
2022-03-14 15:07:13 +01:00
Glenn Jocher
caf7ad0500
Allow 3-point segments ( #6938 )
...
May resolve https://github.com/ultralytics/yolov5/issues/6931
2022-03-10 18:41:47 +01:00
Glenn Jocher
6dd82c0252
Move `git_describe()` to general.py ( #6918 )
...
* Move `git_describe()` to general.py
* Move `git_describe()` to general.py
2022-03-09 18:22:53 +01:00
Glenn Jocher
e6e36aac10
Update bytes to GB with bitshift ( #6886 )
2022-03-07 19:26:37 +01:00
Glenn Jocher
4728840745
Update `--cache disk` deprecate `*_npy/` dirs ( #6876 )
...
* Updates
* Updates
* Updates
* Updates
* Updates
* Updates
* Updates
* Updates
* Updates
* Updates
* Cleanup
* Cleanup
2022-03-06 16:16:17 +01:00
Glenn Jocher
8a66ebad44
Add `*.ts` to `VID_FORMATS` ( #6859 )
2022-03-04 14:10:13 +01:00
Glenn Jocher
601dbb83f0
AutoAnchor improved initialization robustness ( #6854 )
...
* Update AutoAnchor
* Update AutoAnchor
* [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>
2022-03-04 10:32:18 +01:00
Louis Combaldieu
bcc92e2169
Update sweep.yaml ( #6825 )
...
* Update sweep.yaml
Changed focal loss gamma search range between 1 and 4
* Update sweep.yaml
lowered the min value to match default
2022-03-04 09:39:23 +01:00
Glenn Jocher
63ddb6f0d0
Update autoanchor.py ( #6794 )
...
* Update autoanchor.py
* Update autoanchor.py
2022-02-26 19:15:12 +01:00
Glenn Jocher
0f819919ad
Update EMA decay `tau` ( #6769 )
...
* Update EMA
* Update EMA
* ratio invert
* fix ratio invert
* fix2 ratio invert
* warmup iterations to 100
* ema_k
* implement tau
* implement tau
2022-02-25 12:33:09 +01:00
Glenn Jocher
c161557563
Default `OMP_NUM_THREADS=8` ( #6770 )
2022-02-25 00:09:14 +01:00
Glenn Jocher
2692e67c5f
Updated VOC hyperparameters ( #6732 )
...
* Update hyps
* Update hyp.VOC.yaml
* Update pathlib
* Update hyps
* Update hyps
* Update hyps
* Update hyps
2022-02-22 12:11:18 +01:00
Glenn Jocher
c43f135571
Update `nw` to `max(nd, 1)` ( #6714 )
2022-02-20 21:47:46 +01:00
Glenn Jocher
4de8b24881
Suppress `torch` AMP-CPU warnings ( #6706 )
...
This is a torch bug, but they seem unable or unwilling to fix it so I'm creating a suppression in YOLOv5.
Resolves https://github.com/ultralytics/yolov5/issues/6692
2022-02-19 16:48:33 +01:00
Samuel Yvon
0365379016
Fix floating point in number of workers `nw` ( #6701 )
...
Integer division by a float yields a (rounded) float. This causes
the dataloader to crash when creating a range.
2022-02-18 21:06:21 +01:00
Glenn Jocher
2e5c67e537
Robust `scipy.cluster.vq.kmeans` too few points ( #6668 )
...
* Handle `scipy.cluster.vq.kmeans` too few points
Resolves #6664
* Update autoanchor.py
* Cleanup
2022-02-17 12:55:03 +01:00
Glenn Jocher
1ff43702a8
Validate with 2x `--workers` single-GPU/CPU fix ( #6659 )
...
Fix for #6658 for single-GPU and CPU training use cases
2022-02-16 14:50:37 +01:00
Glenn Jocher
6769021901
Validate with 2x `--workers` ( #6658 )
2022-02-16 14:44:44 +01:00
imyhxy
ca0a00784d
Fixed wandb logger KeyError ( #6637 )
2022-02-14 17:08:36 +01:00
Glenn Jocher
538930023c
Fix ConfusionMatrix scale `vmin=0.0` ( #6638 )
...
Fix attempt for https://github.com/ultralytics/yolov5/issues/6626
2022-02-14 14:54:55 +01:00
Glenn Jocher
a45e472358
YOLOv5 Export Benchmarks ( #6613 )
...
* Add benchmarks.py
* Update
* Add requirements
* Updates
* Updates
* Updates
* Updates
* Updates
* Updates
* dataset autodownload from root
* Update
* Redirect to /dev/null
* sudo --help
* Cleanup
* Add exports pd df
* Updates
* Updates
* Updates
* Cleanup
* dir handling fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Cleanup
* Cleanup2
* Cleanup3
* Cleanup model_type
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-12 16:05:43 +01:00
Ayush Chaurasia
96d8f86085
W&B: don't log media in evolve ( #6617 )
2022-02-12 13:04:50 +01:00
Ayush Chaurasia
51f7750aad
W&B: Improve resume stability ( #6611 )
...
* log best.pt metrics at train end
* update
* Update __init__.py
* flush callbacks when using evolve
* remember batch size on resuming
* Update train.py
* improve stability of resume
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-02-12 13:03:09 +01:00
Glenn Jocher
b40bdd6b2d
YouTube dependency fix `youtube_dl==2020.12.2` ( #6612 )
...
Per https://github.com/ultralytics/yolov5/issues/5860#issuecomment-1035320018 by @hdnh2006
2022-02-11 13:46:20 +01:00
or-toledano
cb2ad9f685
Fix `ROOT / data` when running W&B `log_dataset()` ( #6606 )
...
* Fix missing data folder when running log_dataset
* Use ROOT/'data'
* PEP8 whitespace
2022-02-10 16:17:47 +01:00
Glenn Jocher
c21da596f3
Fix `hyp_evolve.yaml` indexing bug ( #6604 )
...
* Fix `hyp_evolve.yaml` indexing bug
Bug caused hyp_evolve.yaml to display latest generation result rather than best generation result.
* Update plots.py
* Update general.py
* Update general.py
* Update general.py
2022-02-10 14:51:29 +01:00
Glenn Jocher
364b7c5111
Fix YouTube dislike button bug in `pafy` package ( #6603 )
...
Per https://github.com/ultralytics/yolov5/issues/6583#issuecomment-1034421945 by @alicera
2022-02-10 13:13:44 +01:00
Glenn Jocher
9c513ca629
Add `DATASETS_DIR` global in general.py ( #6578 )
2022-02-08 22:20:44 +01:00
Glenn Jocher
f627bc53f8
Fix `plot_labels()` colored histogram bug ( #6574 )
...
* Fix `plot_labels()` colored histogram bug
* Cleanup
2022-02-08 14:03:50 +01:00
Glenn Jocher
b57abb17f2
Move trainloader functions to class methods ( #6559 )
...
* Move trainloader functions to class methods
* results = ThreadPool(NUM_THREADS).imap(self.load_image, range(n))
* Cleanup
2022-02-07 18:59:26 +01:00
Jirka Borovec
cba4303d32
Fix 6 Flake8 issues ( #6541 )
...
* F541
* F821
* F841
* E741
* E302
* E722
* Apply suggestions from code review
* Update general.py
* Update datasets.py
* Update export.py
* Update plots.py
* Update plots.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-02-05 15:22:59 +01:00
Glenn Jocher
c3e599cfda
Update val_batch*.jpg for Chinese fonts ( #6526 )
...
* Update plots for Chinese fonts
* make is_chinese() non-str safe
* Add global FONT
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update general.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-03 19:09:24 +01:00
Glenn Jocher
6445a8137e
Resolve dataset paths ( #6489 )
2022-02-01 15:54:51 +01:00
Glenn Jocher
d8b5beb0b0
Fix2 `select_device()` for Multi-GPU ( #6461 )
...
* Fix2 select_device() for Multi-GPU
* Cleanup
* Cleanup
* Simplify error message
* Improve assert
* Update torch_utils.py
2022-01-28 08:18:01 +01:00
Glenn Jocher
856d4e5733
Fix `select_device()` for Multi-GPU ( #6434 )
...
* Fix `select_device()` for Multi-GPU
Possible fix for https://github.com/ultralytics/yolov5/issues/6431
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
2022-01-26 23:47:00 +01:00
Glenn Jocher
fe7de6a82d
Revert "Remove `dataset_stats()` autodownload capability ( #6303 )" ( #6442 )
...
This reverts commit 3119b2f27c .
2022-01-26 19:10:59 +01:00
toschi23
3b7ac28ed1
Add `*.asf` video support ( #6436 )
2022-01-26 14:26:02 +01:00
Glenn Jocher
d5966c93f1
Namespace `VERBOSE` env variable to `YOLOv5_VERBOSE` ( #6428 )
...
* Verbose updates
* Verbose updates
2022-01-25 17:57:27 -05:00
Jonathan Samelson
ed9bac8392
Rename logger from 'utils.logger' to 'yolov5' ( #6421 )
...
* Gave a more explicit name to the logger
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-01-25 07:21:06 -08:00
Glenn Jocher
482af479c0
Add `detect.py` GIF video inference ( #6410 )
...
* Add detect.py GIF video inference
* Cleanup
2022-01-24 13:11:11 -08: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
sitecao
e1893c894a
`DEVICE_COUNT` instead of `WORLD_SIZE` to calculate `nw` ( #6324 )
2022-01-20 13:06:26 -10:00
imyhxy
4e841b9b16
Reuse `de_parallel()` rather than `is_parallel()` ( #6354 )
2022-01-20 10:50:17 -10:00
johnk2hawaii
9708cf56ea
New environment variable `VERBOSE` ( #6353 )
...
New environment variable `VERBOSE`
2022-01-19 14:32:19 -10:00
Glenn Jocher
fd55271c04
Console corrupted -> corrupt ( #6338 )
...
* Console corrupted -> corrupt
Minor style changes.
* Update export.py
2022-01-18 10:49:26 -10:00
Glenn Jocher
3119b2f27c
Remove `dataset_stats()` autodownload capability ( #6303 )
...
* Remove `dataset_stats()` autodownload capability
@kalenmike security update per Slack convo
* Update datasets.py
2022-01-18 10:04:49 -10:00
Glenn Jocher
436ffc417a
`select_device()` cleanup ( #6302 )
...
* `select_device()` cleanup
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
2022-01-14 15:48:15 -10:00
Henry
a1a9c6884c
Fixing bug multi-gpu training ( #6299 )
...
* Fixing bug multi-gpu training
This solves this issue: https://github.com/ultralytics/yolov5/issues/6297#issue-1103853348
* Update torch_utils.py for pep8
2022-01-14 10:11:06 -10:00
Glenn Jocher
e7bf38277f
Fix `device` count check ( #6290 )
...
* Fix device count check()
* Update torch_utils.py
* Update torch_utils.py
* Update hubconf.py
2022-01-13 21:23:03 -10:00
Glenn Jocher
af001349e4
Add `is_kaggle()` function ( #6285 )
...
* Add `is_kaggle()` function
Return True if environment is Kaggle Notebook.
* Remove root loggers only if is_kaggle() == True
* Update general.py
2022-01-13 12:39:42 -10:00
Glenn Jocher
9e9219fe17
Fix `nan`-robust stream FPS ( #6198 )
...
Fix for Webcam stop working suddenly (Issue #6197 )
2022-01-04 19:32:42 -08:00
Glenn Jocher
b4a29b5a8d
Update NMS `max_wh=7680` for 8k images ( #6178 )
2022-01-03 10:54:52 -08:00
Chen Gen
affa284352
Refactor/reduce G/C/D/IoU `if: else` statements ( #6087 )
...
* Refactor the code to reduece else
* Update metrics.py
* Cleanup
Co-authored-by: Cmos <gen.chen@ubisoft.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-30 13:59:29 -08:00
Awsaf
7b6938d5b5
Log best results ( #6085 )
...
* log best result in summary
* comment added
* add space for `flake8`
* log `best/epoch`
* fix `dimension` for epoch
ValueError: all the input arrays must have same number of dimensions
* log `best/` in `utils.logger.__init__`
* fix pre-commit
1. missing whitespace around operator
2. over-indented
2021-12-30 13:47:53 -08:00
Ayush Chaurasia
9155eb8641
W&B: Log best results after training ends ( #6120 )
...
* log best.pt metrics at train end
* update
* Update __init__.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-30 11:43: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
JieLi
afa5cfb0f8
Reduce G/D/CIoU logic operations ( #6074 )
...
Consider that the default value is CIOU,adjust the order of judgment could reduce the number of judgments.
And “elif CIoU:” didn't need 'if'.
Co-authored-by: 李杰 <360751194@qq.comqq.com>
2021-12-23 11:53:00 +01:00
Glenn Jocher
b8a4babd60
Simplify `set_logging()` indexing ( #6042 )
2021-12-20 17:42:52 +01:00
Glenn Jocher
0db9d5b6a2
Kaggle `LOGGER` fix ( #6041 )
2021-12-20 17:30:46 +01:00
Glenn Jocher
407a905747
Check TensorRT>=8.0.0 version ( #6021 )
...
* Check TensorRT>=8.0.0 version
* [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-12-17 14:59:46 +01:00
Glenn Jocher
da9a1b719b
Allow `--weights URL` ( #5991 )
2021-12-15 15:27:08 +01:00
Mrinal Jain
b7d18f3636
Increase `ar_thr` from 20 to 100 for better detection on slender (high aspect ratio) objects ( #5556 )
...
* Making `ar_thr` available as a hyperparameter
* Disabling ar_thr as hyperparameter and computing from the dataset instead
* Fixing bug in ar_thr computation
* Fix `ar_thr` to 100
2021-12-15 14:42:23 +01:00
Glenn Jocher
c9a46a60e0
Update callbacks.py with `__init__()` ( #5979 )
...
Add __init__() function.
2021-12-14 15:47:49 +01:00
Glenn Jocher
8f875d93a2
Refactor NUM_THREADS ( #5954 )
2021-12-11 14:32:18 +01:00
iumyx2612
a42af30d8a
Update `strip_optimizer()` ( #5949 )
...
Replace 'training_result' with 'best_fitness' in strip_optimizer() to match key with ckpt from train.py
2021-12-10 18:06:27 +01:00
Felix You
c45f9f678d
Make `select_device()` robust to `batch_size=-1` ( #5940 )
...
* Find out a bug. When set batch_size = -1 to use the autobatch.
reproduce:
* Fix type conflict
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-10 15:27:20 +01:00
Glenn Jocher
c77a5a84e3
Absolute '/content/sample_data' ( #5922 )
2021-12-08 17:31:31 +01:00
Glenn Jocher
a3d5f1d3e3
Revert "Update `plot_lr_scheduler()` ( #5864 )" ( #5920 )
...
This reverts commit 360eec6910 .
2021-12-08 16:46:24 +01:00
Glenn Jocher
7d56d45124
Add hardware checks to `notebook_init()` ( #5919 )
...
* Update notebook
* Update notebook
* update string
* update string
* Updates
* Updates
* Updates
* check both ipython and psutil
* remove sample_data if is_colab
* cleanup
* [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-12-08 14:57:03 +01:00
Ayush Chaurasia
3f152e5807
Update wandb_utils.py ( #5908 )
2021-12-07 16:09:11 +01:00
Glenn Jocher
7bf04d9bbf
`AutoShape()` models as `DetectMultiBackend()` instances ( #5845 )
...
* Update AutoShape()
* autodownload ONNX
* Cleanup
* Finish updates
* Add Usage
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* fix device
* Update hubconf.py
* Update common.py
* smart param selection
* autodownload all formats
* autopad only pytorch models
* new_shape edits
* stride tensor fix
* Cleanup
2021-12-04 15:00:07 +01:00
Glenn Jocher
d885799c71
Update `nl` after `cutout()` ( #5873 )
2021-12-03 15:28:14 +01:00
Can
360eec6910
Update `plot_lr_scheduler()` ( #5864 )
...
shallow copy modify originals
2021-12-03 13:37:45 +01:00
Glenn Jocher
00e308f7be
Update TorchScript suffix to `*.torchscript` ( #5856 )
2021-12-02 16:06:45 +01:00
gggmt
1679aacdc7
Update `LoadImages` `ret_val=False` handling ( #5852 )
...
Video errors may occur.
2021-12-02 10:57:39 +01:00
Yu Zhang
e8f8f2b903
Avoid inplace modifying`imgs` in `LoadStreams` ( #5850 )
...
When OpenCV retrieving image fail, original code would modify source images **inplace**, which may result in plotting bounding boxes on a black image. That is, before inference, source image `im0s[i]` is OK, but after inference before `Process predictions`, `im0s[i]` may have been changed.
2021-12-02 10:51:19 +01:00
Glenn Jocher
bc484579d7
Handle non-TTY `wandb.errors.UsageError` ( #5839 )
...
* `try: except (..., wandb.errors.UsageError)`
* bug fix
2021-12-01 15:38:02 +01:00
Glenn Jocher
5ca5dd4c87
Update `dataset_stats()` to `cv2.INTER_AREA` ( #5821 )
2021-11-29 13:15:36 +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
Zengyf-CVer
f17c86b7f0
Save *.npy features on detect.py `--visualize` ( #5701 )
...
* Add feature map to save npy files
Add feature map to save npy files,export npy files with 32 feature maps per layer.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update plots.py
* Update plots.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update plots.py
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-21 20:21:44 +01:00
Glenn Jocher
36d12a500e
Explicitly compute TP, FP in val.py ( #5727 )
2021-11-20 01:04:56 +01:00
Jirka Borovec
eb51ffdcac
Prune unused imports ( #5711 )
...
* prune unused imports
* [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-19 13:32:53 +01:00
Glenn Jocher
8df64a9122
`NUM_THREADS` leave at least 1 CPU free ( #5706 )
...
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses https://github.com/ultralytics/yolov5/issues/5685
2021-11-18 14:53:42 +01:00
dependabot[bot]
fb19561f98
Bump pip from 19.2 to 21.1 in /utils/google_app_engine ( #5661 )
...
Bumps [pip](https://github.com/pypa/pip ) from 19.2 to 21.1.
- [Release notes](https://github.com/pypa/pip/releases )
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst )
- [Commits](https://github.com/pypa/pip/compare/19.2...21.1 )
---
updated-dependencies:
- dependency-name: pip
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 20:10:29 +01:00
Ayush Chaurasia
540ef0dd30
W&B refactor, handle exceptions, CI example ( #5618 )
...
* handle exceptions| attempt CI
* update
* Pre-commit manual run
* yaml one-liner
* Update ci-testing.yml
* Comment W&B CI
Leave as example for future separate CI
* Update ci-testing.yml
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-14 13:26:53 +01:00
Glenn Jocher
80cfaf40ef
AutoAnchor and AutoBatch `LOGGER` ( #5635 )
...
* AutoBatch, AutoAnchor `LOGGER`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update autoanchor.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-13 15:40:18 +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
d5b21b1ecb
HUB dataset previews to JPEG ( #5627 )
...
@kalenmike per our convo yesterday.
2021-11-12 12:05:25 +01:00
Glenn Jocher
def7a0fd19
Improve plots.py robustness ( #5616 )
...
* Improve plots.py robustness
Addresses issues #5374 , #5395 , #5611
* [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-11 12:56:38 +01:00
Glenn Jocher
69032519bc
`np.unique()` sort fix for segments ( #5609 )
...
* `np.unique()` sort fix for segments
* Update datasets.py
2021-11-11 00:15:17 +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
Ayman Saleh
27bf4282d3
Fix `check_requirements()` resource warning allocation open file ( #5602 )
...
* Fix to resource warning allocation; utilize file.open within a context manager
* rename fh to f
in keeping with naming convention
Co-authored-by: Ayman Saleh <aymansaleh@Aymans-MacBook-Pro-2.local>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-10 12:51:30 +01:00
Glenn Jocher
7ebb5e5da6
Add `notebook_init()` to utils/__init__.py ( #5488 )
...
* Update __init__.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* notebook_init
* notebook_init
* notebook_init
* notebook_init
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* notebook_init
* Created using Colaboratory
* [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-09 23:03:19 +01:00
Glenn Jocher
3883261143
New `DetectMultiBackend()` class ( #5549 )
...
* New `DetectMultiBackend()` class
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* pb to pt fix
* Cleanup
* explicit apply_classifier path
* Cleanup2
* Cleanup3
* Cleanup4
* Cleanup5
* Cleanup6
* val.py MultiBackend inference
* warmup fix
* to device fix
* pt fix
* device fix
* Val cleanup
* COCO128 URL to assets
* half fix
* detect fix
* detect fix 2
* remove half from DetectMultiBackend
* training half handling
* training half handling 2
* training half handling 3
* Cleanup
* Fix CI error
* Add torchscript _extra_files
* Add TorchScript
* Add CoreML
* CoreML cleanup
* New `DetectMultiBackend()` class
* pb to pt fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Cleanup
* explicit apply_classifier path
* Cleanup2
* Cleanup3
* Cleanup4
* Cleanup5
* Cleanup6
* val.py MultiBackend inference
* warmup fix
* to device fix
* pt fix
* device fix
* Val cleanup
* COCO128 URL to assets
* half fix
* detect fix
* detect fix 2
* remove half from DetectMultiBackend
* training half handling
* training half handling 2
* training half handling 3
* Cleanup
* Fix CI error
* Add torchscript _extra_files
* Add TorchScript
* Add CoreML
* CoreML cleanup
* revert default to pt
* Add Usage examples
* Cleanup val
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-09 16:45:02 +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
3f64ad1760
Fix `save_one_box()` ( #5545 )
...
* Fix `save_one_box()`
* [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-06 19:28:03 +01:00
Glenn Jocher
e189fa15ea
`intersect_dicts()` in hubconf.py fix ( #5542 )
2021-11-06 15:41:17 +01:00
Glenn Jocher
cb18cac33d
Update autobatch.py ( #5538 )
...
* Update autobatch.py
* Update autobatch.py
* Update autobatch.py
2021-11-06 13:49:00 +01:00
Glenn Jocher
60e42e16c2
Update autobatch.py ( #5536 )
2021-11-06 12:21:17 +01:00
Glenn Jocher
32b8738735
Update `check_file()` avoid repeat URL downloads ( #5526 )
2021-11-05 19:22:47 +01:00
Glenn Jocher
853505339a
Fix `increment_path()` explicit file vs dir handling ( #5523 )
...
Resolves https://github.com/ultralytics/yolov5/pull/5341#issuecomment-961774729
Tests:
```python
import glob
import re
from pathlib import Path
def increment_path(path, exist_ok=False, sep='', mkdir=False):
# Increment file or directory path, i.e. runs/exp --> runs/exp{sep}2, runs/exp{sep}3, ... etc.
path = Path(path) # os-agnostic
if path.exists() and not exist_ok:
path, suffix = (path.with_suffix(''), path.suffix) if path.is_file() else (path, '')
dirs = glob.glob(f"{path}{sep}*") # similar paths
matches = [re.search(rf"%s{sep}(\d+)" % path.stem, d) for d in dirs]
i = [int(m.groups()[0]) for m in matches if m] # indices
n = max(i) + 1 if i else 2 # increment number
path = Path(f"{path}{sep}{n}{suffix}") # increment path
if mkdir:
path.mkdir(parents=True, exist_ok=True) # make directory
return path
print(increment_path('runs'))
print(increment_path('export.py'))
print(increment_path('abc.def.dir'))
print(increment_path('abc.def.file'))
```
2021-11-05 15:46:20 +01:00
Glenn Jocher
17b5f5b974
Fix `increment_path()` with periods ( #5518 )
...
Fix for https://github.com/ultralytics/yolov5/issues/5503
```
python detect.py --visualize --source path/to/file.suffix1.jpg
```
2021-11-05 11:16:19 +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
84a8099b75
Update torch_utils.py import `LOGGER` ( #5483 )
2021-11-03 17:17:38 +01:00
Glenn Jocher
df30426c03
Improve GPU name ( #5478 )
...
* Improve GPU name
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
2021-11-03 16:59:53 +01:00
Mrinal Jain
7476012a4d
Update `check_git_status()` to run under `ROOT` working directory ( #5441 )
...
* Updating check_git_status() to switch to the repository root before performing git ops
* More pythonic
* Linting
* Remove redundant Path() call
* Generalizing the context manager
* Fixing error in context manager
* Cleanup
* Change to decorator
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-02 22:16:01 +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
8c326a1edf
Meshgrid `indexing='ij'` for PyTorch 1.10 ( #5309 )
...
* Meshgrid `indexing='ij'` for PyTorch 1.10
Will not merge currently as breaks backwards compatibility.
* Meshgrid `indexing='ij'` for PyTorch 1.10
Will not merge currently as breaks backwards compatibility.
* Add check_version hard argument
* Update comment
2021-11-01 14:33:08 +01:00
Glenn Jocher
5d4258fac5
Fix MixConv2d() remove shortcut + apply depthwise ( #5410 )
2021-10-30 13:38:51 +02:00
Ayush Chaurasia
620b535f85
Update sweep.py ( #5402 )
2021-10-29 19:21:59 +02:00
Jirka Borovec
ed887b5976
Add pre-commit CI actions ( #4982 )
...
* define pre-commit
* add CI code
* configure
* apply pre-commit
* fstring
* apply MD
* pre-commit
* Update torch_utils.py
* Update print strings
* notes
* Cleanup code-format.yml
* Update setup.cfg
* Update .pre-commit-config.yaml
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-28 18:35:01 +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
Ayush Chaurasia
692be757b6
W&B: Media panel fix ( #5317 )
2021-10-25 12:06:12 +02:00
Glenn Jocher
441b47c443
More informative `EarlyStopping()` message ( #5303 )
2021-10-22 20:02:19 +02:00
jdfr
15e8c4c15b
take EXIF orientation tags into account when fixing corrupt images ( #5270 )
...
* take EXIF orientation tags into account when fixing corrupt images
* fit 120 char
* sort imports
* Update local exif_transpose comment
We have a local inplace version that is faster than the official as the image is not copied. AutoShape() uses this for Hub models, but here it is not important as the datasets.py usage is infrequent (AutoShape() it is applied every image).
* Update datasets.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-20 21:35:47 +02:00
jdfr
db3bbdde0e
autosplit: take image files with uppercase extensions into account ( #5269 )
...
* take image files with uppercase extensions into account in autosplit
* case fix
* Refactor implementation
Removes additional variable (capital variable names are also only for global variables), and uses the same methodology as implemented earlier in datasets.py L409.
* Remove redundant rglob characters
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-20 19:25:33 +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
Glenn Jocher
13f7275555
Update/inplace ops ( #5233 )
...
* Clip Objects365 autodownload labels (#5214 )
Fixes out of bounds labels that seem to affect ~10% of images in dataset.
* Inplace ops
2021-10-18 14:24:48 +02:00
Glenn Jocher
991c654e81
Autofix duplicate label handling ( #5210 )
...
* 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
2021-10-15 12:32:08 -07:00
Glenn Jocher
7ee5aed0b3
Improved check_suffix() robustness to `''` and `""` ( #5192 )
...
* Improved check_suffix() robustness to `''` and `""`
* Cleanup
2021-10-14 12:00:39 -07:00
NauchtanRobotics
0be58f16f0
Adjust legend labels for classes without instances ( #5174 )
...
* legend-labels Adjust legend labels for classes without instances.
* #5158 Re-indexed series names: only classes containing data.
* #5158 Re-indexed series names: only classes containing data.
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-14 11:57:00 -07:00
Ayush Chaurasia
1172ac15fb
W&B: DDP fix ( #5176 )
...
* fix dpp with wandb disabled
* PyCharm reformat
* Fix
* fix
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-13 20:11:04 -07:00
Glenn Jocher
e520e820f1
Update autodownload fallbacks to v6.0 assets ( #5177 )
2021-10-13 19:58:38 -07:00
Ayush Chaurasia
d0bfeb3980
W&B: fix DDP with wandb disabled ( #5163 )
...
* fix dpp with wandb disabled
* PyCharm reformat
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-13 16:17:15 -07:00
Glenn Jocher
a346926996
Add class filtering to `LoadImagesAndLabels()` dataloader ( #5172 )
...
* 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
2021-10-13 15:48:54 -07:00
Jebastin Nadar
9d75e42f98
Refactor `Detect()` anchors for ONNX <> OpenCV DNN compatibility ( #4833 )
...
* refactor anchors and anchor_grid in Detect Layer
* fix CI failures by adding compatibility
* fix tf failure
* fix different devices errors
* Cleanup
* fix anchors overwriting issue
* better refactoring
* Remove self.anchor_grid shape check (redundant with self.grid check)
Also PEP8 / 120 line width
* Convert _make_grid() from static to dynamic method
* Remove anchor_grid.to(device)
clone() should already clone to same device as self.anchors
* fix different devices error
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-11 09:58:42 -07:00
Glenn Jocher
4cf7d487a6
Update plots.py ( #5127 )
2021-10-11 01:59:22 -07:00
Glenn Jocher
276b674513
Fix SKU-110K HUB: `OSError` ( #5106 )
2021-10-09 00:12:59 -07:00
Egor Orel
48b00dbc0d
Re-open IP-camera videostream if disconnected ( #5074 )
...
* Re-open IP-camera videostream if disconnected. Provide IP-streaming analysis stability
* Re-open IP-camera videostream if disconnected. Provide IP-streaming analysis stability
* `self.imgs[i] *= 0` bug fix and cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-07 23:26:43 -07:00
Glenn Jocher
57ce73cd4f
Update datasets.py comments ( #5088 )
2021-10-07 16:04:08 -07:00
Glenn Jocher
070af88108
Fix `yaml.safe_load()` ignore emoji errors ( #5060 )
2021-10-05 13:41:52 -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
ba99092304
Update W&B README ( #5006 )
2021-09-30 00:35:00 -07:00
Kalen Michael
76d301bd21
Fix URL parsing bug ( #4998 )
...
* 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>
2021-09-29 10:48:45 -07:00
Diego Montes
0c87478713
Update wandb_utils.py ( #4953 )
...
`is_valset_wandb_artifact` and `is_trainset_wandb_artifact` were referenced before assignment causing wandb to be unusable.
2021-09-28 12:22:31 -07:00
Diego Montes
c1bed601e9
Fix `isascii()` method calls for python 3.6 ( #4958 )
...
* fix isascii for python3.6
* update comment with python 3.7 note
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-27 20:16:23 -07:00