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
Glenn Jocher
a820b43aca
Automatic Chinese fonts plotting ( #4951 )
...
* Automatic Chinese fonts plotting
* Default PIL=False
2021-09-27 13:48:15 -07:00
Glenn Jocher
5a8e4343d8
Scope `check_file()` search space ( #4933 )
...
`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.
2021-09-26 17:11:46 -07:00
Glenn Jocher
793383232f
Update default Albumentations ( #4931 )
2021-09-26 12:10:33 -07:00
Glenn Jocher
39c17ce0b9
Fix `root` referenced before assignment ( #4920 )
...
* Fix `root` referenced before assignment
Fix for bug introduced by #4919 discovered on VOC autodownload:
```
python train.py --data VOC.yaml
```
* Cleanup
2021-09-25 09:16:14 -07:00
Glenn Jocher
a64a4c839f
Replace `os.system('unzip file.zip')` -> `ZipFile.extractall()` ( #4919 )
...
* Replace `os.system('unzip file.zip')` -> `ZipFile.extractall()`
* Cleanup
2021-09-25 08:52:36 -07:00
Jiacong Fang
ce7fa81d4e
Avoid out-of-image class labels ( #4902 )
...
* Avoid out-of-image class labels
* Update plots.py
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-24 09:23:28 -07:00
Ayush Chaurasia
59aae85a7e
W&B: Fix dataset check ( #4879 )
...
* evolve fix
* Enable login timeout
* fix pkg
* check rank
* don't relogin
* fix
* reformat
2021-09-21 20:02:32 +02:00
Ayush Chaurasia
9febea79de
W&B: Login only in master processes ( #4866 )
...
* evolve fix
* Enable login timeout
* fix pkg
* check rank
* don't relogin
2021-09-20 16:19:34 +02:00
Glenn Jocher
8ad9e4ed5b
Annotator `check_font()` RANK -1 remove progress ( #4864 )
...
* Annotator `check_font()` RANK -1 remove progress
* Cleanup
2021-09-20 13:57:23 +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
84bfa89236
Consolidate `init_seeds()` ( #4849 )
2021-09-18 13:28:42 +02:00
Ayush Chaurasia
302a1b0bb0
W&B: Enable login timeout ( #4843 )
...
* evolve fix
* Enable login timeout
* fix pkg
2021-09-17 18:59:34 +02:00
Glenn Jocher
4fdaec0449
Single `cache_version` definition ( #4846 )
...
Defines dataset labels *.cache version in a single place, fixing a bug introduced in #4845 .
2021-09-17 18:01:52 +02:00
Glenn Jocher
fe39562a5f
Sorted datasets update to `cache_labels()` ( #4845 )
...
PR should produce datasets sorted alphabetically by filename. Cache version incremented to 0.5.
Note: will force a one-time re-caching of existing datasets on first-use.
2021-09-17 17:35:45 +02:00
Glenn Jocher
3a822a22ce
`PIL.ImageDraw.text(anchor=...)` removal, reduce to `>=7.1.2` ( #4842 )
...
* Unpin Pillow
* Update requirements.txt
* Update plots.py
2021-09-17 13:02:37 +02:00
Glenn Jocher
27a4736e96
Fix val.py study plot ( #4831 )
...
* Fix val.py study plot
* call plot_val_study
* Rename plot_study_txt to plot_val_study
2021-09-16 17:55:58 +02:00
Kalen Michael
43b2817f6e
Feature/fix export on url ( #4823 )
...
* added callbacks
* added back callback to main
* added save_dir to callback output
* merged in upstream
* removed ghost code
* added url check
* Add url2file()
* Update file-only
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-16 13:33:54 +02:00
Jihoon Kim
fcb225c1c8
Shuffle all 4(or 9) images in mosaic augmentation ( #4787 )
...
Thank you for sharing nice open-source codes 👍
I applied to shuffle the order of all 4(or 9) images in mosaic augmentation
Currently, the order of images in mosaic augmentation is not completely random.
The remaining images except the first are randomly arranged. Apply shuffle all to increase the diversity of data composition.
2021-09-15 00:57:06 +02:00
Glenn Jocher
c3a93d783d
Add TensorFlow formats to `export.py` ( #4479 )
...
* Initial commit
* Remove unused export_torchscript return
* ROOT variable
* Add prefix to fcn arg
* fix ROOT
* check_yaml into run()
* interim fixes
* imgsz=(320, 320)
* Hardcode tf_raw_resize False
* Finish opt elimination
* Update representative_dataset_gen()
* Update export.py with TF methods
* SiLU and GraphDef fixes
* file_size() directory handling feature
* export fixes
* add lambda: to representative_dataset
* Detect training False default
* Fuse false for TF models
* Embed agnostic NMS arguments
* Remove lambda
* TensorFlow.js export success
* Add pb to Usage
* Add *_tfjs_model/ to ignore files
* prepend YOLOv5 to function headers
* Remove end --- comments
* parameterize tfjs export pb file
* update run() data default /ROOT
* update --include help
* update imports
* return ct_model
* Consolidate TFLite export
* pb prerequisite to tfjs
* TF modules CamelCase
* Remove exports from tf.py and cleanup
* pass agnostic NMS arguments
* CI
* CI
* ignore *_web_model/
* Add tensorflow to CI dependencies
* CI tensorflow-cpu
* Update requirements.txt
* Remove tensorflow check_requirement
* CI coreml tfjs
* export only onnx torchscript
* reorder exports torchscript first
2021-09-12 15:52:24 +02:00
Glenn Jocher
c47be26f34
Replace `path.absolute()` with `path.resolve()` ( #4763 )
2021-09-11 22:46:33 +02:00
Glenn Jocher
cd810c8286
Centralize `user_config_dir()` decision making ( #4755 )
2021-09-11 16:32:08 +02:00
Glenn Jocher
22ee6fb7c1
Update `is_writeable()` for 2 methods ( #4744 )
...
* Writeable test
* Fix
* Cleanup
2021-09-10 17:52:33 +02:00
Glenn Jocher
a144536f88
Fix `is_writeable()` for 3 OS support ( #4743 )
...
* Fix `is_writeable()` for 3 OS support
* Update general.py
2021-09-10 17:06:22 +02:00
Josh Veitch-Michaelis
19e28e3bfe
Add `callbacks` to train function in W&B sweep ( #4742 )
...
* add callbacks to train function in wandb sweep
Fix following https://github.com/ultralytics/yolov5/pull/4688 which modified the function signature to `train`
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-10 16:28:52 +02:00
Glenn Jocher
4a025ae97f
Fix `user_config_dir()` for GCP/AWS functions ( #4726 )
...
* Fix `user_config_dir()` for GCP/AWS functions
Compatability fix for GCP functions and AWS lambda for user config directory in https://github.com/ultralytics/yolov5/pull/4628
* Windows skip check
2021-09-09 17:57:46 +02:00
JD Costa
deb434aefa
Make CONFIG_DIR configurable per environment variable ( #4727 )
2021-09-09 15:29:18 +02:00
Glenn Jocher
8e94bf62d9
Add `user_config_dir('Ultralytics')` ( #4715 )
...
* Add `user_config_dir`
* Linux to .config
2021-09-08 18:13:59 +02:00
Glenn Jocher
25a7e1dae5
Update `check_yaml()` comment ( #4713 )
...
* Update `check_yaml()` comment
* Cleanup
2021-09-08 16:01:03 +02:00
Glenn Jocher
f984cce52a
Fix `check_suffix()` ( #4712 )
...
Fix a bug when `file=''`
2021-09-08 15:06:31 +02:00
Glenn Jocher
a2b3c71636
Add suffix checks ( #4711 )
...
* Add suffix checks
* Cleanup
* Cleanup2
* Cleanup3
2021-09-08 14:36:12 +02:00
Zhiqiang Wang
8e5f9ddbdb
Remove redundant `ComputeLoss` code ( #4701 )
2021-09-08 12:48:33 +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
Glenn Jocher
234e8ae6fa
Fix for `plot_evolve()` string argument ( #4639 )
2021-09-01 15:00:13 +02:00
Glenn Jocher
de534e9221
Fix 3 for Arial.ttf redownloads with hub inference ( #4629 )
...
Fix 3 for Arial.ttf redownloads with hub inference, follow-on to #4628 .
2021-08-31 20:54:10 +02:00
Glenn Jocher
a4e8f78c5e
Fix 2 for Arial.ttf redownloads with hub inference ( #4628 )
2021-08-31 20:05:17 +02:00
Glenn Jocher
ba0f80874f
Fix for Arial.ttf redownloads with hub inference ( #4627 )
2021-08-31 15:01:41 +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
bb5ebc290e
Close `matplotlib` plots after opening ( #4612 )
...
* Close plots
* Replace fig.close() for plt.close()
2021-08-30 17:22:21 +02:00
Ayush Chaurasia
11e7c7b48d
W&B: Don't log models in evolve operation ( #4611 )
2021-08-30 17:07:20 +02:00
Glenn Jocher
3a72d4a7e3
Update `check_git_status()` warning ( #4610 )
2021-08-30 17:05:45 +02:00
Glenn Jocher
e7d1842a98
Auto-download Arial.ttf on init ( #4606 )
...
* Auto-download Arial.ttf on init
* Fix ROOT
2021-08-30 14:58:22 +02:00
Glenn Jocher
dc13820c9d
TensorBoard `on_train_end()` speed improvements ( #4605 )
2021-08-30 13:01:41 +02:00
Glenn Jocher
b894e69dfc
Update mosaic plots font size ( #4596 )
2021-08-29 18:05:49 +02:00
Glenn Jocher
dbbc6b5c48
Re-order `plots.py` to class-first ( #4595 )
2021-08-29 17:44:51 +02:00
Glenn Jocher
e5e5ebc799
Auto-UTF handling ( #4594 )
2021-08-29 17:15:18 +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
Takumi Karasawa
7b35971ba5
Fix bug in `plot_one_box` when label is `None` ( #4588 )
2021-08-29 15:08:27 +02:00
Glenn Jocher
bbfafeabdb
Add `Profile()` profiler ( #4587 )
...
* Add `Profile()` profiler
* CamelCase Timeout
2021-08-29 13:49:04 +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
8ac96b7975
Fix for AP calculation limits 0.0 - 1.0 ( #4563 )
...
This PR brings alignment in AP computation practices with Detectron2 and MMDetection.
Problem first noted by @yusiyoh in https://github.com/ultralytics/yolov5/issues/4546
2021-08-27 13:23:29 +02:00
Glenn Jocher
e899d6e8fb
Fix for corrupt JPEGs auto-fix PR ( #4560 )
...
Auto-fix corrupt JPEGs PR introduced a bug whereby the f.seek() operation read all of the bytes in the image, resulting in the PIL image having nothing to read upon the .save() operation.
Fix was to re-open the image using PIL before saving.
2021-08-27 13:01:21 +02:00
Glenn Jocher
11f85e7e71
Auto-fix corrupt JPEGs ( #4548 )
...
* Autofix corrupt JPEGs
This PR automatically re-saves corrupt JPEGs and trains with the resaved images. WARNING: this will overwrite the existing corrupt JPEGs in a dataset and replace them with correct JPEGs, though the filesize may increase and the image contents may not be exactly the same due to lossy JPEG compression schemes. Results may vary by JPEG decoder and hardware.
Current behavior is to exclude corrupt JPEGs from training with a warning to the user, but many users have been complaining about large parts of their dataset being excluded from training.
* Clarify re-save reason
2021-08-26 15:51:04 +02:00
Glenn Jocher
7b1643b5b5
Add `install=True` argument to `check_requirements` ( #4512 )
...
* Add `install=True` argument to `check_requirements`
* Update general.py
2021-08-23 14:38:30 +02:00
Ayush Chaurasia
7316b78e36
W&B: Refactor the wandb_utils.py file ( #4496 )
...
* 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
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* Fix
* fix
* refactor constructor
* refactor
* refactor
* refactor
* PyCharm reformat
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-23 13:10:07 +02:00
Huu Quan, CAP
1d65e8194d
Fix missing labels after albumentations ( #4455 )
...
* fix missing labels after augmentation
* Update datasets.py
Cleanup
Co-authored-by: Huu Quan <huuquan@HuuQuans-MacBook.local>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-18 12:07:09 +02:00
Jiacong Fang
808bcad3bb
Add TensorFlow and TFLite export ( #1127 )
...
* Add models/tf.py for TensorFlow and TFLite export
* Set auto=False for int8 calibration
* Update requirements.txt for TensorFlow and TFLite export
* Read anchors directly from PyTorch weights
* Add --tf-nms to append NMS in TensorFlow SavedModel and GraphDef export
* Remove check_anchor_order, check_file, set_logging from import
* Reformat code and optimize imports
* Autodownload model and check cfg
* update --source path, img-size to 320, single output
* Adjust representative_dataset
* Put representative dataset in tfl_int8 block
* detect.py TF inference
* weights to string
* weights to string
* cleanup tf.py
* Add --dynamic-batch-size
* Add xywh normalization to reduce calibration error
* Update requirements.txt
TensorFlow 2.3.1 -> 2.4.0 to avoid int8 quantization error
* Fix imports
Move C3 from models.experimental to models.common
* Add models/tf.py for TensorFlow and TFLite export
* Set auto=False for int8 calibration
* Update requirements.txt for TensorFlow and TFLite export
* Read anchors directly from PyTorch weights
* Add --tf-nms to append NMS in TensorFlow SavedModel and GraphDef export
* Remove check_anchor_order, check_file, set_logging from import
* Reformat code and optimize imports
* Autodownload model and check cfg
* update --source path, img-size to 320, single output
* Adjust representative_dataset
* detect.py TF inference
* Put representative dataset in tfl_int8 block
* weights to string
* weights to string
* cleanup tf.py
* Add --dynamic-batch-size
* Add xywh normalization to reduce calibration error
* Update requirements.txt
TensorFlow 2.3.1 -> 2.4.0 to avoid int8 quantization error
* Fix imports
Move C3 from models.experimental to models.common
* implement C3() and SiLU()
* Fix reshape dim to support dynamic batching
* Add epsilon argument in tf_BN, which is different between TF and PT
* Set stride to None if not using PyTorch, and do not warmup without PyTorch
* Add list support in check_img_size()
* Add list input support in detect.py
* sys.path.append('./') to run from yolov5/
* Add int8 quantization support for TensorFlow 2.5
* Add get_coco128.sh
* Remove --no-tfl-detect in models/tf.py (Use tf-android-tfl-detect branch for EdgeTPU)
* Update requirements.txt
* Replace torch.load() with attempt_load()
* Update requirements.txt
* Add --tf-raw-resize to set half_pixel_centers=False
* Add --agnostic-nms for TF class-agnostic NMS
* Cleanup after merge
* Cleanup2 after merge
* Cleanup3 after merge
* Add tf.py docstring with credit and usage
* pb saved_model and tflite use only one model in detect.py
* Add use cases in docstring of tf.py
* Remove redundant `stride` definition
* Remove keras direct import
* Fix `check_requirements(('tensorflow>=2.4.1',))`
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-17 13:18:16 +02:00
Glenn Jocher
f3e3f7603f
TFLite prep ( #4436 )
2021-08-16 17:25:06 +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
2da4e7acf7
Merge PIL and OpenCV in `plot_one_box(use_pil=False)` ( #4416 )
...
* Merge PIL and OpenCV box plotting functions
* Add ASCII check to plot_one_box
* Cleanup
* Cleanup2
2021-08-14 17:44:15 +02:00
Glenn Jocher
63e09fdc48
Remove `encoding='ascii'` ( #4413 )
...
* Remove `encoding='ascii'`
* Reinstate `encoding='ascii'` in emojis()
2021-08-14 13:47:20 +02:00
Glenn Jocher
e086347377
Update plots.py ( #4407 )
2021-08-14 12:50:27 +02:00
Glenn Jocher
3e7c59ad3b
Fix rename `utils.google_utils` to `utils.downloads` ( #4393 )
2021-08-11 23:40:47 +02:00
Ayush Chaurasia
a4e4553040
W&B: Fix for 4360 ( #4388 )
...
* 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
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* Fix
* fix
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-11 21:56:25 +02:00
Ayush Chaurasia
75d323dd8b
W&B: Add advanced features tutorial ( #4384 )
...
* 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
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* Initial readme update
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-11 18:35:43 +02:00
Sudhanshu Singh
f409d8e54f
Update README.md ( #4309 )
...
remove unnecessary "`"
2021-08-04 22:11:48 +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
Glenn Jocher
4103ce9ad0
Simplify callbacks ( #4289 )
2021-08-04 13:17:35 +02:00
imyhxy
771ac6c53d
Fixed logging level in distributed mode ( #4284 )
...
Co-authored-by: fkwong <huangfuqiang@transai.cn>
2021-08-03 13:11:42 +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
Ayush Chaurasia
621caea53c
W&B: Fix sweep bug ( #4276 )
...
* 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
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* call wandblogger.log instead of wandb.log
* Fix Sweep bug
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-02 18:41:52 +02:00
Ayush Chaurasia
cd540d8625
W&B: suppress warnings ( #4257 )
...
* 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
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* call wandblogger.log instead of wandb.log
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-01 12:06:53 +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
Glenn Jocher
d8f18834a2
Update `profile()` for CUDA Memory allocation ( #4239 )
...
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Update profile()
* Cleanup
2021-07-30 18:17:19 +02:00
Glenn Jocher
9468657502
Update profiler ( #4236 )
2021-07-30 16:00:47 +02:00
Glenn Jocher
7820614c40
Add `@try_except` decorator ( #4224 )
2021-07-29 17:23:35 +02:00
Glenn Jocher
b60b62e874
PyCharm reformat ( #4209 )
...
* PyCharm reformat
* YAML reformat
* Markdown reformat
2021-07-28 23:35:14 +02:00
Ayush Chaurasia
750465edae
W&B: More improvements and refactoring ( #4205 )
...
* 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
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-28 23:25:15 +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
Ayush Chaurasia
63a1971e31
Improve docstrings and run names ( #4174 )
2021-07-27 15:13:32 +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
imyhxy
4495e00016
Fix indentation in `log_training_progress()` ( #4126 )
2021-07-23 14:55:00 +02:00
Glenn Jocher
4bad914761
Update resume.py ( #4115 )
2021-07-22 17:22:11 +02:00
Glenn Jocher
2c073cd207
Add train.py ``--img-size` floor ( #4099 )
2021-07-21 16:50:47 +02:00
Ayush Chaurasia
0cc7c58787
W&B: fix refactor bugs ( #4069 )
2021-07-19 13:57:13 +02:00
Glenn Jocher
7fdcc77bf4
Albumentations >= 1.0.3 ( #4068 )
2021-07-19 13:23:19 +02:00
Glenn Jocher
c8a98cb7cb
Missing `nc` and `names` handling in check_dataset() ( #4066 )
2021-07-19 13:10:21 +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
Ayush Chaurasia
62409eea08
W&B sweeps support ( #3938 )
...
* Add support for W&B Sweeps
* Update and reformat
* Update search space
* reformat
* reformat sweep.py
* Update sweep.py
* Move sweeps files to wandb dir
* Remove print
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-14 19:13:02 +02:00
Glenn Jocher
720aaa65c8
Rename `test.py` to `val.py` ( #4000 )
2021-07-14 15:43:54 +02:00
Glenn Jocher
b3dabdcc38
Update `probability` to `p` ( #3980 )
2021-07-12 15:54:43 +02:00
Glenn Jocher
90e60b403d
Update `np.random.random()` to `random.random()` ( #3967 )
2021-07-11 16:56:36 +02:00
Glenn Jocher
8298ce5e88
Update `albumentations>=1.0.2` ( #3966 )
2021-07-11 15:49:30 +02:00
Glenn Jocher
80299a57e2
Numerical stability fix for Albumentations ( #3958 )
2021-07-10 19:50:53 +02:00
Glenn Jocher
443af8b25a
Cache v0.4 update ( #3954 )
2021-07-10 14:18:46 +02:00
Glenn Jocher
a26e7de2bf
Update augmentations.py ( #3948 )
2021-07-09 16:45:04 +02:00
Glenn Jocher
248504cf13
Feature visualization improvements 32 ( #3947 )
2021-07-09 15:23:02 +02:00
Glenn Jocher
8c6f9e15bf
Update `dataset_stats()` for zipped datasets ( #3926 )
...
* Update `dataset_stats()` for zipped datasets
@KalenMike
* cleanup
2021-07-08 11:42:30 +02:00
Glenn Jocher
850970e081
`feature_visualization()` CUDA fix ( #3925 )
2021-07-07 16:23:31 +02:00
Glenn Jocher
87b094bcbc
Feature visualization update ( #3920 )
...
* Feature visualization update
* Save to jpg (faster)
* Save to png
2021-07-07 15:41:58 +02:00
Glenn Jocher
33202b7f0b
YOLOv5 + Albumentations integration ( #3882 )
...
* Albumentations integration
* ToGray p=0.01
* print confirmation
* create instance in dataloader init method
* improved version handling
* transform not defined fix
* assert string update
* create check_version()
* add spaces
* update class comment
2021-07-05 18:01:54 +02:00
Glenn Jocher
6a3ee7cf03
Hub models `map_location=device` ( #3894 )
...
* Hub models `map_location=device`
* cleanup
2021-07-05 16:20:46 +02:00
Glenn Jocher
3c3f8fbd5d
Improved BGR2RGB speeds ( #3880 )
...
* Update BGR2RGB ops
* speed improvements
* cleanup
2021-07-04 20:12:32 +02:00
Glenn Jocher
9e8fb9fd0b
Create `utils/augmentations.py` ( #3877 )
...
* Create `utils/augmentations.py`
* cleanup
2021-07-04 18:14:04 +02:00
ketan-b
9d86b54eb3
Add multi-stream saving feature ( #3864 )
...
* Added the recording feature for multiple streams
Thanks for the very cool repo!!
I was trying to record multiple feeds at the same time, but the current version of the detector only had one video writer and one vid_path!
So the streams were not being saved and only were initialized with one frame and this process didn't record the whole thing.
Fix:
I made a list of `vid_writer` and `vid_path` and the `i` from the loop over the `pred` took care of the writer which need to work!
I hope this helps, Thanks!
* Cleanup list lengths
* batch size variable
* Update datasets.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-04 12:55:57 +02:00
Valentin Aliferov
831773f5a2
Add EXIF rotation to YOLOv5 Hub inference ( #3852 )
...
* rotating an image according to its exif tag
* Update common.py
* Update datasets.py
* Update datasets.py
faster
* delete extraneous gpg file
* Update common.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-07-02 13:25:54 +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
Feras Oughali
7d6af69638
Fix `LoadStreams()` dataloader frame skip issue ( #3833 )
...
* Update datasets.py to read every 4th frame of streams
* Update datasets.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-30 12:11:29 +02:00
Glenn Jocher
5ea771d93d
Move IoU functions to metrics.py ( #3820 )
2021-06-29 13:18:13 +02:00
Glenn Jocher
3213d8713f
Fix for `dataset_stats()` with updated data.yaml ( #3819 )
...
@KalenMike
2021-06-29 12:44:59 +02:00
Glenn Jocher
02719dde52
Update `feature_visualization()` ( #3807 )
...
* Update `feature_visualization()`
Only plot for data with height, width > 1
* cleanup
* Cleanup
2021-06-28 13:48:14 +02:00
Zigarss
20d45aa4f1
Add feature map visualization ( #3804 )
...
* Add feature map visualization
Add a feature_visualization function to visualize the mid feature map of the model.
* Update yolo.py
* remove boolean from forward and reorder if statement
* remove print from forward
* General cleanup
* Indent
* Update plots.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-28 13:18:45 +02:00
Glenn Jocher
8e7f285051
Fix datasets for aws and get_coco.sh ( #3788 )
...
* merge master
* Update get_coco.sh
2021-06-26 15:29:16 +02:00
Glenn Jocher
8035b61682
Update objectness IoU sort ( #3786 )
2021-06-26 14:52:18 +02:00
Glenn Jocher
157aa2f886
Objectness IoU Sort ( #3610 )
...
Co-authored-by: U-LAPTOP-5N89P8V7\banhu <ban.huang@foxmail.com>
2021-06-26 14:45:53 +02:00
Glenn Jocher
f89941711c
NGA xView 2018 Dataset Auto-Download ( #3775 )
...
* update clip_coords for numpy
* uncomment
* cleanup
* Add autosplits
* fix
* cleanup
2021-06-26 00:49:05 +02:00
Ayush Chaurasia
ffb6e11050
W&B: Update Tables API and comply with new dataset_check ( #3772 )
...
* Update tables API and windows path fix
* update dataset check
2021-06-25 20:45:33 +02:00
Yonghye Kwon
374957317a
Add `xyxy2xywhn()` ( #3765 )
...
* Edit Comments for numpy2torch tensor process
Edit Comments for numpy2torch tensor process
* add xyxy2xywhn
add xyxy2xywhn
* add xyxy2xywhn
* formatting
* pass arguments
pass arguments
* edit comment for xyxy2xywhn()
edit comment for xyxy2xywhn()
* cleanup datasets.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-25 11:47:46 +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
Yonghye Kwon
417a2f425c
Edit comment ( #3759 )
...
edit comment
2021-06-24 15:57:27 +02:00
Glenn Jocher
63060910a6
Update `check_datasets()` for dynamic unzip path ( #3732 )
...
@KalenMike
2021-06-22 16:05:38 +02:00
Glenn Jocher
9ac7d388a9
Backwards compatible cache version checks ( #3730 )
2021-06-22 13:50:47 +02:00
Glenn Jocher
b83e1a4adc
Fix `img2label_paths()` order ( #3720 )
...
* Fix `img2label_paths()` order
* fix, 1
2021-06-21 22:50:56 +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
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
Mai Thanh Minh
bf209f6fe9
Skip HSV augmentation when hyperparameters are [0, 0, 0] ( #3686 )
...
* Create shortcircuit in augment_hsv when hyperparameter are zero
* implement faster opt-in
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-19 11:51:21 +02:00
Glenn Jocher
814806c61d
Update cache check ( #3691 )
...
Swapped order of operations for faster first per f527704cd3 (r52362419)
2021-06-19 11:22:09 +02:00
Glenn Jocher
f527704cd3
Cache v0.3: improved corrupt image/label reporting ( #3676 )
...
* Cache v0.3: improved corrupt image/label reporting
Fix for https://github.com/ultralytics/yolov5/issues/3656#issuecomment-863660899
* cleanup
2021-06-18 10:21:47 +02:00
Glenn Jocher
9b6dba6207
Update `dataset_stats()` to list of dicts ( #3657 )
...
* Update `dataset_stats()` to list of dicts
@KalenMike
* Update datasets.py
2021-06-17 13:59:52 +02:00
xiaowk5516
d808855f77
Assert non-premature end of JPEG images ( #3638 )
...
* premature end of JPEG images
* PEP8 reformat
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-16 13:31:26 +02:00
Glenn Jocher
6c0e1d9fd7
Update `verify_image_label()` ( #3635 )
2021-06-16 11:12:15 +02:00
Glenn Jocher
7d3686a686
Update `check_file()` ( #3622 )
...
* Update `check_file()`
* Update datasets.py
2021-06-15 13:21:04 +02:00
Ayush Chaurasia
daab682b06
Suppress wandb images size mismatch warning ( #3611 )
...
* supress wandb images size mismatch warning
* supress wandb images size mismatch warning
* PEP8 reformat and optimize imports
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-14 18:54:58 +02:00
Glenn Jocher
239a11c197
Download COCO and VOC by default ( #3608 )
2021-06-14 13:58:54 +02:00
Glenn Jocher
f8adee156d
merge develop
2021-06-14 10:45:15 +02:00
Glenn Jocher
7a565f130a
Update `dataset_stats()` ( #3593 )
...
@KalenMike this is a PR to add image filenames and labels to our stats dictionary and to save the dictionary to JSON. Save location is next to the train labels.cache file. The single JSON contains all stats for entire dataset.
Usage example:
```python
from utils.datasets import *
dataset_stats('coco128.yaml', verbose=True)
```
2021-06-12 13:26:41 +02:00
Ayush Chaurasia
53d4fc2e26
W&B: Allow changed in config variable #3588
2021-06-11 23:18:57 +02:00
Glenn Jocher
e8c5237403
ConfusionMatrix `normalize=True` fix ( #3587 )
2021-06-11 11:46:05 +02:00
Glenn Jocher
ec2da4a82c
Add ConfusionMatrix `normalize=True` flag ( #3586 )
2021-06-11 11:37:08 +02:00
Glenn Jocher
095197bd4a
Ignore Seaborn plot warnings ( #3576 )
...
* Ignore Seaborn plot warnings
* Update plots.py
* Update metrics.py
2021-06-10 13:51:29 +02:00
dependabot[bot]
c6deb73a89
Bump pip from 18.1 to 19.2 in /utils/google_app_engine ( #3561 )
...
Bumps [pip](https://github.com/pypa/pip ) from 18.1 to 19.2.
- [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/18.1...19.2 )
---
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-06-09 21:14:09 +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
8b5086c21b
Multi-GPU default to single device 0 ( #3554 )
...
* Multi-GPU default to single device 0
* Multi-GPU default to single device 0
* add space
2021-06-09 15:31:47 +02:00
Glenn Jocher
958ab92dc1
Remove `opt` from `create_dataloader()`` ( #3552 )
2021-06-09 13:14:56 +02:00
Glenn Jocher
f8ec71e1c2
Update `check_python(minimum=3.6.2)` ( #3548 )
2021-06-09 11:34:15 +02:00
Glenn Jocher
1b5edb6f8e
Update `dataset_stats()` for HUB ( #3536 )
...
* Update `dataset_stats()` for HUB
Cleanup of b6fdd2e
* autodownload flag
* Update general.py
* cleanup
2021-06-09 10:56:11 +02:00
Glenn Jocher
b6fdd2e5e5
Create `dataset_stats()` for HUB
2021-06-08 23:09:45 +02:00
Glenn Jocher
8d52c1c5c5
Update datasets.py ( #3531 )
...
Minor updates to https://github.com/ultralytics/yolov5/pull/3505 , inplace accumulation.
2021-06-08 18:36:40 +02:00
Dean Mark
28bff22df8
Use multi-threading in cache_labels ( #3505 )
...
* Use multi threading in cache_labels
* PEP8 reformat
* Add num_threads
* changed ThreadPool.imap_unordered to Pool.imap_unordered
* Remove inplace additions
* Update datasets.py
refactor initial desc
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-06-08 18:00:21 +02:00
Glenn Jocher
317f2ccc9d
Improved `check_requirements()` offline-handling ( #3466 )
...
Improve robustness of `check_requirements()` function to offline environments (do not attempt pip installs when offline).
2021-06-04 21:34:36 +02:00
Glenn Jocher
563ea9475a
Add `check_git_status()` 5 second timeout ( #3464 )
...
* Add check_git_status() 5 second timeout
This should prevent the SSH Git bug that we were discussing @KalenMike
* cleanup
* replace timeout with check_output built-in timeout
2021-06-04 21:17:36 +02:00
Yonghye Kwon
c37f072ba7
Faster HSV augmentation ( #3462 )
...
remove datatype conversion process that can be skipped
2021-06-04 20:02:20 +02:00
Glenn Jocher
d40481acc5
Add `timeout()` class ( #3460 )
...
* Add `timeout()` class
* rearrange order
2021-06-04 15:23:33 +02:00
Glenn Jocher
8e3b4a0bf3
Update MixUp augmentation `alpha=beta=32.0` ( #3455 )
...
Per VOC empirical results https://github.com/ultralytics/yolov5/issues/3380#issuecomment-853001307 by @developer0hye
2021-06-04 12:47:53 +02:00
Glenn Jocher
f8651c388f
Parse URL authentication ( #3424 )
...
* Parse URL authentication
* urllib.parse.unquote()
* improved error handling
* improved error handling
* remove %3F
* update check_file()
2021-06-03 18:44:58 +02:00
chocosaj
3cb9ad4fc4
Update FLOPs description ( #3422 )
...
* Update README.md
* Changing FLOPS to FLOPs.
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
2021-06-03 12:31:51 +02:00
Glenn Jocher
fdbe527dc0
Revert "`cv2.imread(img, -1)` for IMREAD_UNCHANGED ( #3379 )" ( #3395 )
...
This reverts commit 21a9607e00
.
2021-05-31 10:39:00 +02:00
Glenn Jocher
d833ab3d25
Create `is_pip()` function ( #3391 )
...
Returns `True` if file is part of pip package. Useful for contextual behavior modification.
```python
def is_pip():
# Is file in a pip package?
return 'site-packages' in Path(__file__).absolute().parts
```
2021-05-30 20:52:42 +02:00
tudoulei
21a9607e00
`cv2.imread(img, -1)` for IMREAD_UNCHANGED ( #3379 )
...
* Update datasets.py
* comment
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-05-29 21:12:01 +02:00
Glenn Jocher
ba6f3f974b
Enable direct `--weights URL` definition ( #3373 )
...
* Enable direct `--weights URL` definition
@KalenMike this PR will enable direct --weights URL definition. Example use case:
```
python train.py --weights https://storage.googleapis.com/bucket/dir/model.pt
```
* cleanup
* bug fixes
* weights = attempt_download(weights)
* Update experimental.py
* Update hubconf.py
* return bug fix
* comment mirror
* min_bytes
2021-05-28 15:18:44 +02:00
Glenn Jocher
4d4a2b0520
Ignore blank lines in `*.txt` labels ( #3366 )
...
Fix for https://github.com/ultralytics/yolov5/issues/958#issuecomment-849512083
2021-05-27 14:31:26 +02:00
Glenn Jocher
2435bfe896
Add URL download to check_file() ( #3330 )
...
* Add URL file download to check_file()
* cleanup
* pathlib bug fix
2021-05-26 15:51:49 +02:00
Glenn Jocher
c6b5bfca85
Updated cache v0.2 with `hashlib` ( #3350 )
...
* Update cache v0.2 to include parent hash
Possible fix for https://github.com/ultralytics/yolov5/issues/3349
* Update datasets.py
2021-05-26 14:26:52 +02:00
Glenn Jocher
aad99b63d6
TensorBoard DP/DDP graph fix ( #3325 )
2021-05-25 11:45:24 +02:00
Glenn Jocher
73a92dc1b6
Explicit `git clone` master ( #3311 )
2021-05-24 12:42:36 +02:00
Glenn Jocher
9f3a388cea
Improved check_requirements() robustness ( #3298 )
...
Add try: except clause on missing requirements install to catch install failures. Prompted by Ultralytics YOLOv5 API failure on Cython.
2021-05-23 18:00:23 +02:00
yeric1789
a039b7796d
PyTorch Hub `crops = results.crop()` return values ( #3282 )
...
* Changing save_one_box
Made to work with other changes to common.py
* PEP8 and single line BGR
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-05-23 16:00:55 +02:00
Glenn Jocher
0e2f2cbb51
Update LoadStreams init fallbacks ( #3295 )
2021-05-23 14:55:42 +02:00
Charles Frye
19100ba007
Improves docs and handling of entities and resuming by WandbLogger ( #3264 )
...
* adds latest tag to match wandb defaults
* adds entity handling, 'last' tag
* fixes bug causing finished runs to resume
* removes redundant "last" tag for wandb artifact
2021-05-21 23:42:53 +02:00
Glenn Jocher
683cefead4
YouTube stream ending fix ( #3277 )
...
* YouTube stream ending fix
Properly terminates YouTube streams on video end. Should resolve issues #2769 and #3220 .
* Update datasets.py
2021-05-21 16:51:07 +02:00
Glenn Jocher
f3402353fb
check `batch_size % utilized_device_count` ( #3276 )
...
Bug fix to check batch_size divisibility of utilized CUDA device count vs total system CUDA device count.
2021-05-21 15:20:03 +02:00
yeric1789
7b0eb952ca
`plot_one_box()` default `color=(128, 128, 128)` ( #3240 )
...
* Color can be none by default
* `plot_one_box()` default `color=(128, 128, 128)`
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-05-19 19:47:36 +02:00
Adrian Holovaty
3f74cd9ed1
Parameterize max_det + inference default at 1000 ( #3215 )
...
* Added max_det parameters in various places
* 120 character line
* PEP8
* 120 character line
* Update inference default to 1000 instances
* Update inference default to 1000 instances
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-05-17 22:47:44 +02:00
Glenn Jocher
13a1c72699
Update datasets.py ( #3216 )
2021-05-17 22:24:26 +02:00
Glenn Jocher
ffb47ffbeb
Silent Patches Bug Fix ( #3214 )
2021-05-17 17:47:30 +02:00
Glenn Jocher
36b0a9e7d0
Add CAP_PROP_FRAME_COUNT for YouTube sources ( #3193 )
2021-05-17 12:27:40 +02:00
Glenn Jocher
ae53f50ae7
Plot labels histogram colors ( #3192 )
2021-05-17 11:44:22 +02:00
Glenn Jocher
c1c7eb023f
Update JSON response ( #3139 )
2021-05-12 18:23:50 +02:00
Glenn Jocher
52c05707d6
Update Colors() ( #3046 )
...
* Update Colors()
* update colors
* update colors
2021-05-12 17:41:11 +02:00
Glenn Jocher
abfcf9eb79
Replace print() with logging.info() in trainloader ( #3103 )
...
Might indirectly help #3095 by providing better visibility on source of corruption.
2021-05-10 17:07:16 +02:00
Glenn Jocher
57b0d3a605
Add check_python() ( #3088 )
...
* Add check_python()
Checks python version against minimum version of 3.7.0.
* remove packaging dependency
* refactor import
2021-05-09 15:33:38 +02:00
Ayush Chaurasia
d2a17289c9
Explicitly convert artifact path to posix_path ( #3067 )
...
* Explicitly convert artifact path to posix_path
* Remove redudant str() casting
2021-05-07 19:53:56 +02:00
Ayush Chaurasia
b18ca31ff5
use check_file for --data ( #3035 )
2021-05-05 14:28:19 +02:00
Glenn Jocher
8cab907f60
download() ThreadPool update ( #3027 )
...
* download() ThreadPool update
* update train image count
* cid + 1
2021-05-04 23:37:31 +02:00
Glenn Jocher
5189b3addb
Objects365 Update
2021-05-04 02:25:14 +02:00
Glenn Jocher
41cc7caee6
Add NMS threshold checks ( #3020 )
...
* Add NMS threshold checks
* fix
2021-05-03 15:07:20 +02:00
Glenn Jocher
fcd57028d2
Add is_colab() function ( #3018 )
2021-05-03 12:37:50 +02:00
Glenn Jocher
31ee54c28c
Hubconf.py bug fix ( #3007 )
2021-05-01 18:15:17 +02:00
Glenn Jocher
37eaffec7d
Curl update ( #3004 )
...
* Curl update
* Curl update
2021-05-01 17:29:51 +02:00
Glenn Jocher
4d7bca7648
Add unzip flag to download() ( #3002 )
2021-05-01 12:37:41 +02:00
Glenn Jocher
54652fe3ff
Objects365 update
2021-05-01 00:16:58 +02:00
Ayush Chaurasia
801b469878
Improve performance of dataset Logger ( #2943 )
...
* Improve performance of Dataset Logger
* Fix scaling bug
2021-04-30 21:54:26 +02:00
Glenn Jocher
955eea8b96
Make cache saving optional ( #2977 )
2021-04-30 00:56:44 +02:00
Glenn Jocher
a833ee2a46
Update check_requirements() exclude list ( #2974 )
2021-04-29 21:16:23 +02:00
Glenn Jocher
2c7c075fb1
Update restapi.py ( #2967 )
2021-04-28 17:50:07 +02:00
Glenn Jocher
57812df68c
New Colors() class ( #2963 )
2021-04-28 16:05:14 +02:00
Glenn Jocher
1849916726
Check_requirements() enclosing apostrophe bug fix ( #2929 )
...
This fixes a bug where the '>' symbol in python package requirements was not running correctly with subprocess.check_output() commands.
2021-04-25 23:33:25 +02:00
Glenn Jocher
9c7bb5a52c
ACON Activation batch-size 1 bug patch ( #2901 )
...
* ACON Activation batch-size 1 bug path
This is not a great solution to https://github.com/nmaac/acon/issues/4 but it's all I could think of at the moment.
WARNING: YOLOv5 models with MetaAconC() activations are incapable of running inference at batch-size 1 properly due to a known bug in https://github.com/nmaac/acon/issues/4 with no known solution.
* Update activations.py
* Update activations.py
* Update activations.py
* Update activations.py
2021-04-25 22:54:07 +02:00
NanoCode012
c0d3f80544
Add verbose option to pytorch hub models ( #2926 )
...
* Add verbose and update print to logging
* Fix positonal param
* Revert auto formatting changes
* Update hubconf.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-25 22:01:05 +02:00
Glenn Jocher
45632b2704
Update download() for tar.gz files ( #2919 )
...
* Update download() for tar.gz files
* Update general.py
2021-04-24 15:53:15 +02:00
Glenn Jocher
1b1ab4cca2
Add file_size() function ( #2911 )
...
* Add file_size() function
* Update export.py
2021-04-24 01:31:11 +02:00
Glenn Jocher
14d2d2d75f
Update google_utils.py ( #2900 )
2021-04-22 20:27:32 +02:00
Glenn Jocher
264d860f8d
ACON activation function ( #2893 )
...
* ACON Activation Function
## 🚀 Feature
There is a new activation function [ACON (CVPR 2021)](https://arxiv.org/pdf/2009.04759.pdf ) that unifies ReLU and Swish.
ACON is simple but very effective, code is here: https://github.com/nmaac/acon/blob/main/acon.py#L19

The improvements are very significant:

## Alternatives
It also has an enhanced version meta-ACON that uses a small network to learn beta explicitly, which may influence the speed a bit.
## Additional context
[Code](https://github.com/nmaac/acon ) and [paper](https://arxiv.org/pdf/2009.04759.pdf ).
* Update activations.py
2021-04-22 17:26:05 +02:00
r-blmnr
0395e39fd0
Uppercase model filenames enabled ( #2890 )
2021-04-22 16:51:21 +02:00
Glenn Jocher
78fd077657
VisDrone2019-DET Dataset Auto-Download ( #2882 )
...
* VisDrone Dataset Auto-Download
* add visdrone.yaml
* cleanup
* add VisDrone2019-DET-test-dev
* cleanup VOC
2021-04-22 12:10:26 +02:00
Michael Heilig
d48a34dca7
bug fix: switched rows and cols for correct detections in confusion matrix ( #2883 )
2021-04-22 00:49:55 +02:00
JoshSong
5f7d39fede
Cleanup load_image() ( #2871 )
...
* don't resize up in load_image if augmenting
* cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-21 15:50:28 +02:00
Glenn Jocher
f7bc685c2c
Implement yaml.safe_load() ( #2876 )
...
* Implement yaml.safe_load()
* yaml.safe_dump()
2021-04-21 14:34:45 +02:00
Burhan
c949fc86d1
Detection cropping+saving feature addition for detect.py and PyTorch Hub ( #2827 )
...
* Update detect.py
* Update detect.py
* Update greetings.yml
* Update cropping
* cleanup
* Update increment_path()
* Update common.py
* Update detect.py
* Update detect.py
* Update detect.py
* Update common.py
* cleanup
* Update detect.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-20 23:51:08 +02:00
Glenn Jocher
c5c647e281
Update increment_path() to handle file paths ( #2867 )
2021-04-20 19:47:07 +02:00
Glenn Jocher
c15e25c40f
PyTorch Hub cv2 .save() .show() bug fix ( #2831 )
...
* PyTorch Hub cv2 .save() .show() bug fix
cv2.rectangle() was failing on non-contiguous np array inputs. This checks for contiguous arrays and applies is necessary:
```python
imgs[i] = im if im.data.contiguous else np.ascontiguousarray(im) # update
```
* Update plots.py
```python
assert im.data.contiguous, 'Image not contiguous. Apply np.ascontiguousarray(im) to plot_on_box() input image.'
```
* Update hubconf.py
Expand CI tests to OpenCV image.
2021-04-18 13:47:40 +02:00
Glenn Jocher
aff03be35a
YouTube Bug Fix ( #2818 )
...
Fix for #2810
```shell
python detect.py --source 0
```
introduced by YouTube Livestream Detection PR #2752
2021-04-16 17:58:28 +02:00
Glenn Jocher
1f3e482bce
ONNX Simplifier ( #2815 )
...
* ONNX Simplifier
Add ONNX Simplifier to ONNX export pipeline in export.py. Will auto-install onnx-simplifier if onnx is installed but onnx-simplifier is not.
* Update general.py
2021-04-16 14:03:27 +02:00
Robin
1479737064
Flask REST API Example ( #2732 )
...
* add files
* Update README.md
* Update README.md
* Update restapi.py
pretrained=True and model.eval() are used by default when loading a model now, so no need to call them manually.
* PEP8 reformat
* PEP8 reformat
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-15 13:26:08 +02:00
Glenn Jocher
0f395b3e3b
YOLOv5 v5.0 Release patch 1 ( #2764 )
...
* torch.jit.trace(model, img, strict=False)
* Update check_file()
* Update hubconf.py
* Update README.md
2021-04-11 23:11:43 +02:00
Glenn Jocher
f5b8f7d54c
YOLOv5 v5.0 Release ( #2762 )
2021-04-11 19:23:47 +02:00
Ben Milanko
e2b7bc0b32
YouTube Livestream Detection ( #2752 )
...
* Youtube livestream detection
* dependancy update to auto install pafy
* Remove print
* include youtube_dl in deps
* PEP8 reformat
* youtube url check fix
* reduce lines
* add comment
* update check_requirements
* stream framerate fix
* Update README.md
* cleanup
* PEP8
* remove cap.retrieve() failure code
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-11 18:53:40 +02:00
Glenn Jocher
0cae7576a9
utils/wandb_logging PEP8 reformat ( #2755 )
...
* wandb_logging PEP8 reformat
* Update wandb_utils.py
2021-04-10 21:09:23 +02:00
Glenn Jocher
c03d590320
Add Hub results.pandas() method ( #2725 )
...
* Add Hub results.pandas() method
New method converts results from torch tensors to pandas DataFrames with column names.
This PR may partially resolve issue https://github.com/ultralytics/yolov5/issues/2703
```python
results = model(imgs)
print(results.pandas().xyxy[0])
xmin ymin xmax ymax confidence class name
0 57.068970 391.770599 241.383545 905.797852 0.868964 0 person
1 667.661255 399.303589 810.000000 881.396667 0.851888 0 person
2 222.878387 414.774231 343.804474 857.825073 0.838376 0 person
3 4.205386 234.447678 803.739136 750.023376 0.658006 5 bus
4 0.000000 550.596008 76.681190 878.669922 0.450596 0 person
```
* Update comments
torch example input now shown resized to size=640 and also now a multiple of P6 stride 64 (see https://github.com/ultralytics/yolov5/issues/2722#issuecomment-814785930 )
* apply decorators
* PEP8
* Update common.py
* pd.options.display.max_columns = 10
* Update common.py
2021-04-07 16:28:07 +02:00
Ayush Chaurasia
3067429307
Add support for list-of-directory data format for wandb ( #2719 )
2021-04-06 16:57:13 +02:00
Ayush Chaurasia
514ebcdf33
Fix : #2674 ( #2683 )
...
* Set resume flag to false
* Check existance of val dataset
2021-04-02 11:54:50 +02:00
Ayush Chaurasia
2a28ef374b
Set resume flag to false ( #2657 )
2021-03-31 13:47:54 +02:00
Phat Tran
9c803f2f7e
Add --label-smoothing eps argument to train.py (default 0.0) ( #2344 )
...
* Add label smoothing option
* Correct data type
* add_log
* Remove log
* Add log
* Update loss.py
remove comment (too versbose)
Co-authored-by: phattran <phat.tranhoang@cyberlogitec.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-29 18:45:46 +02:00
Glenn Jocher
866bc7d640
Speed profiling improvements ( #2648 )
...
* Speed profiling improvements
* Update torch_utils.py
deepcopy() required to avoid adding elements to model.
* Update torch_utils.py
2021-03-29 15:19:07 +02:00
zzttqu
1e8ab3f5f2
Add tqdm pbar.close() ( #2644 )
...
When using tqdm, sometimes it can't print in one line and roll to next line.
2021-03-29 12:21:25 +02:00
Glenn Jocher
2e95cf3d79
Improve git_describe() fix 1 ( #2635 )
...
Add stderr=subprocess.STDOUT to catch error messages.
2021-03-28 17:09:06 +02:00
Ayush Chaurasia
518c09578e
W&B resume ddp from run link fix ( #2579 )
...
* W&B resume ddp from run link fix
* Native DDP W&B support for training, resuming
2021-03-28 16:11:36 +02:00
Glenn Jocher
6e8c5b7678
Improve git_describe() ( #2633 )
...
Catch 'fatal: not a git repository' returns and return '' instead (observed in GCP Hub checks).
2021-03-28 15:39:31 +02:00
Glenn Jocher
0ff5aeca61
Create date_modified() ( #2616 )
...
Updated device selection string with fallback for non-git directories.
```python
def select_device(device='', batch_size=None):
# device = 'cpu' or '0' or '0,1,2,3'
s = f'YOLOv5 🚀 {git_describe() or date_modified()} torch {torch.__version__} ' # string
...
```
2021-03-26 12:52:47 +01:00
maxupp
196bf10603
Add '*.mpo' to supported image formats ( #2615 )
...
Co-authored-by: Max Uppenkamp <max.uppenkamp@inform-software.com>
2021-03-26 12:45:22 +01:00
Glenn Jocher
77415a42e5
Update git_describe() for remote dir usage ( #2606 )
2021-03-26 01:44:00 +01:00
Glenn Jocher
3bb414890a
resume.py typo ( #2603 )
2021-03-25 20:55:20 +01:00
Glenn Jocher
d4456e43b2
Update segment2box() comment ( #2600 )
2021-03-25 15:12:49 +01:00
Glenn Jocher
333ccc5b0f
YOLOv5 PyTorch Hub models >> check_requirements() ( #2592 )
...
Improved user-feedback following requirements auto-update.
2021-03-24 17:51:39 +01:00
Glenn Jocher
75feeb797c
YOLOv5 PyTorch Hub models >> check_requirements() ( #2591 )
...
Prints 'Please restart runtime or rerun command for update to take effect.' following package auto-install to inform users to restart/rerun.
2021-03-24 16:42:54 +01:00
Glenn Jocher
2b329b0945
Enhanced check_requirements() with auto-install ( #2575 )
...
* Update check_requirements() with auto-install
This PR builds on an idea I had to automatically install missing dependencies rather than simply report an error message.
YOLOv5 should now 1) display all dependency issues and not simply display the first missing dependency, and 2) attempt to install/update each missing/VersionConflict package.
* cleanup
* cleanup 2
* Check requirements.txt file exists
* cleanup 3
2021-03-24 01:05:59 +01:00
Ayush Chaurasia
1bf9365280
W&B DDP fix ( #2574 )
2021-03-23 16:54:34 +01:00
Ayush Chaurasia
e8fc97aa38
Improved W&B integration ( #2125 )
...
* Init Commit
* new wandb integration
* Update
* Use data_dict in test
* Updates
* Update: scope of log_img
* Update: scope of log_img
* Update
* Update: Fix logging conditions
* Add tqdm bar, support for .txt dataset format
* Improve Result table Logger
* Init Commit
* new wandb integration
* Update
* Use data_dict in test
* Updates
* Update: scope of log_img
* Update: scope of log_img
* Update
* Update: Fix logging conditions
* Add tqdm bar, support for .txt dataset format
* Improve Result table Logger
* Add dataset creation in training script
* Change scope: self.wandb_run
* Add wandb-artifact:// natively
you can now use --resume with wandb run links
* Add suuport for logging dataset while training
* Cleanup
* Fix: Merge conflict
* Fix: CI tests
* Automatically use wandb config
* Fix: Resume
* Fix: CI
* Enhance: Using val_table
* More resume enhancement
* FIX : CI
* Add alias
* Get useful opt config data
* train.py cleanup
* Cleanup train.py
* more cleanup
* Cleanup| CI fix
* Reformat using PEP8
* FIX:CI
* rebase
* remove uneccesary changes
* remove uneccesary changes
* remove uneccesary changes
* remove unecessary chage from test.py
* FIX: resume from local checkpoint
* FIX:resume
* FIX:resume
* Reformat
* Performance improvement
* Fix local resume
* Fix local resume
* FIX:CI
* Fix: CI
* Imporve image logging
* (:(:Redo CI tests:):)
* Remember epochs when resuming
* Remember epochs when resuming
* Update DDP location
Potential fix for #2405
* PEP8 reformat
* 0.25 confidence threshold
* reset train.py plots syntax to previous
* reset epochs completed syntax to previous
* reset space to previous
* remove brackets
* reset comment to previous
* Update: is_coco check, remove unused code
* Remove redundant print statement
* Remove wandb imports
* remove dsviz logger from test.py
* Remove redundant change from test.py
* remove redundant changes from train.py
* reformat and improvements
* Fix typo
* Add tqdm tqdm progress when scanning files, naming improvements
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-23 00:44:50 +01:00
Glenn Jocher
9b11f0c58b
PyTorch Hub models default to CUDA:0 if available ( #2472 )
...
* PyTorch Hub models default to CUDA:0 if available
* device as string bug fix
2021-03-14 23:16:17 -07:00
Glenn Jocher
2d41e70e82
Scipy kmeans-robust autoanchor update ( #2470 )
...
Fix for https://github.com/ultralytics/yolov5/issues/2394
2021-03-14 21:58:12 -07:00
Yann Defretin
38ff499b26
Update autosplit() with annotated_only option ( #2466 )
...
* Be able to create dataset from annotated images only
Add the ability to create a dataset/splits only with images that have an annotation file, i.e a .txt file, associated to it. As we talked about this, the absence of a txt file could mean two things:
* either the image wasn't yet labelled by someone,
* either there is no object to detect.
When it's easy to create small datasets, when you have to create datasets with thousands of images (and more coming), it's hard to track where you at and you don't want to wait to have all of them annotated before starting to train. Which means some images would lack txt files and annotations, resulting in label inconsistency as you say in #2313 . By adding the annotated_only argument to the function, people could create, if they want to, datasets/splits only with images that were labelled, for sure.
* Cleanup and update print()
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-14 17:11:27 -07:00
Glenn Jocher
08d4918d7f
labels.jpg class names ( #2454 )
...
* labels.png class names
* fontsize=10
2021-03-12 22:15:41 -08:00
Glenn Jocher
f01f3223d5
Integer printout ( #2450 )
...
* Integer printout
* test.py 'Labels'
* Update train.py
2021-03-12 13:35:44 -08:00
Glenn Jocher
e8a2b83268
GCP sudo docker userdata.sh ( #2393 )
...
* GCP sudo docker
* cleanup
2021-03-07 20:21:49 -08:00
Glenn Jocher
7c2c95732c
AWS wait && echo "All tasks done." ( #2391 )
2021-03-07 20:18:30 -08:00
Glenn Jocher
ba18528b47
bbox_iou() stability and speed improvements ( #2385 )
2021-03-06 13:07:34 -08:00
Yonghye Kwon
cd8ed3521d
image weights compatible faster random index generator v2 for mosaic augmentation ( #2383 )
...
image weights compatible faster random index generator v2 for mosaic augmentation
2021-03-05 22:58:26 -08:00
Ryan Avery
2c56ad5436
Confusion matrix background axis swap ( #2114 )
2021-03-02 16:09:52 -08:00
Glenn Jocher
fab5085674
EMA bug fix 2 ( #2330 )
...
* EMA bug fix 2
* update
2021-03-01 17:13:34 -08:00
Iden Craven
a82dce7faa
Fix labels being missed when image extension appears twice in filename ( #2300 )
2021-02-25 18:05:38 -08:00
Glenn Jocher
ec1d8496ba
Improved model+EMA checkpointing ( #2292 )
...
* Enhanced model+EMA checkpointing
* update
* bug fix
* bug fix 2
* always save optimizer
* ema half
* remove model.float()
* model half
* carry ema/model in fp32
* rm model.float()
* both to float always
* cleanup
* cleanup
2021-02-24 18:26:46 -08:00
Glenn Jocher
0070995bd5
Amazon AWS EC2 startup and re-startup scripts ( #2282 )
2021-02-24 01:43:59 -08:00
Glenn Jocher
d5d275b6e9
Amazon AWS EC2 startup and re-startup scripts ( #2185 )
...
* Amazon AWS EC2 startup and re-startup scripts
* Create resume.py
* cleanup
2021-02-23 23:10:14 -08:00
xiaowo1996
83dc1b4484
FLOPS min stride 32 ( #2276 )
...
Signed-off-by: xiaowo1996 <429740343@qq.com>
2021-02-23 09:38:56 -08:00
Glenn Jocher
6f5d6fcdaa
Robust objectness loss balancing ( #2256 )
2021-02-20 11:19:01 -08:00
Glenn Jocher
c09964c27c
Update inference default to multi_label=False ( #2252 )
...
* Update inference default to multi_label=False
* bug fix
* Update plots.py
* Update plots.py
2021-02-19 15:39:09 -08:00
Glenn Jocher
47faf95079
reset head
2021-02-19 15:20:41 -08:00
Glenn Jocher
d2e754b67b
Add isdocker() ( #2232 )
...
* Add isdocker()
* Update general.py
* Update general.py
2021-02-16 15:58:07 -08:00
Glenn Jocher
26c2e54c8f
Add check_imshow() ( #2231 )
...
* Add check_imshow()
* Update general.py
* Update general.py
2021-02-16 13:56:47 -08:00
Glenn Jocher
7b833e37bf
LoadStreams() frame loss bug fix ( #2222 )
2021-02-15 11:02:20 -08:00
Glenn Jocher
bdd88e1ed7
YOLOv5 Segmentation Dataloader Updates ( #2188 )
...
* Update C3 module
* Update C3 module
* Update C3 module
* Update C3 module
* update
* update
* update
* update
* update
* update
* update
* update
* update
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* update
* update
* update
* update
* updates
* updates
* updates
* updates
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update datasets
* update
* update
* update
* update attempt_downlaod()
* merge
* merge
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* parameterize eps
* comments
* gs-multiple
* update
* max_nms implemented
* Create one_cycle() function
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* GitHub API rate limit fix
* update
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* ComputeLoss
* astuple
* epochs
* update
* update
* ComputeLoss()
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* merge
* merge
* merge
* merge
* update
* update
* update
* update
* commit=tag == tags[-1]
* Update cudnn.benchmark
* update
* update
* update
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* update
* update
* update
* update
* update
* mosaic9
* update
* update
* update
* update
* update
* update
* institute cache versioning
* only display on existing cache
* reverse cache exists booleans
2021-02-11 21:22:45 -08:00
NanoCode012
a5d5f9262d
Changed socket port and added timeout ( #2176 )
2021-02-10 13:01:48 -08:00
Transigent
c9bda112ae
Update utils/datasets.py to support .webp files ( #2174 )
...
Simply added 'webp' as an image format to the img_formats array so that webp image files can be used as training data.
2021-02-10 00:16:38 -08:00
Glenn Jocher
86897e3663
Update train.py test batch_size ( #2148 )
...
* Update train.py
* Update loss.py
2021-02-06 10:29:32 -08:00
train255
e9b3de463a
Unique *.cache filenames fix ( #2134 )
...
* fix #2121
* Update test.py
* Update train.py
* Update autoanchor.py
* Update datasets.py
* Update log_dataset.py
* Update datasets.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-02-05 11:12:43 -08:00
Glenn Jocher
4bdc5a397e
LoadImages() pathlib update ( #2140 )
2021-02-05 09:06:23 -08:00
Ayush Chaurasia
73a0669930
Start setup for improved W&B integration ( #1948 )
...
* Add helper functions for wandb and artifacts
* cleanup
* Reorganize files
* Update wandb_utils.py
* Update log_dataset.py
We can remove this code, as the giou hyp has been deprecated for a while now.
* Reorganize and update dataloader call
* yaml.SafeLoader
* PEP8 reformat
* remove redundant checks
* Add helper functions for wandb and artifacts
* cleanup
* Reorganize files
* Update wandb_utils.py
* Update log_dataset.py
We can remove this code, as the giou hyp has been deprecated for a while now.
* Reorganize and update dataloader call
* yaml.SafeLoader
* PEP8 reformat
* remove redundant checks
* Update util files
* Update wandb_utils.py
* Remove word size
* Change path of labels.zip
* remove unused imports
* remove --rect
* log_dataset.py cleanup
* log_dataset.py cleanup2
* wandb_utils.py cleanup
* remove redundant id_count
* wandb_utils.py cleanup2
* rename cls
* use pathlib for zip
* rename dataloader to dataset
* Change import order
* Remove redundant code
* remove unused import
* remove unused imports
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-02-01 21:38:41 -08:00
Glenn Jocher
9646ca438a
Update plot_study() ( #2112 )
2021-02-01 13:51:11 -08:00
Glenn Jocher
be9edffded
Update test.py --task speed and study ( #2099 )
...
* Add --speed benchmark
* test range 256 - 1536
* update
* update
* update
* update
2021-01-31 13:58:49 -08:00
Glenn Jocher
a18efc3a73
Add variable-stride inference support ( #2091 )
2021-01-30 13:47:23 -08:00
Glenn Jocher
630ec06af6
Update to colors.TABLEAU_COLORS ( #2069 )
2021-01-28 12:37:21 -08:00
Glenn Jocher
f639e14e4d
Metric-Confidence plots feature addition ( #2057 )
...
* Metric-Confidence plots feature addition
* cleanup
* Metric-Confidence plots feature addition
* cleanup
* Update run-once lines
* cleanup
* save all 4 curves to wandb
2021-01-27 17:10:53 -08:00
Glenn Jocher
f59f80114c
Add 'exclude' tuple to check_requirements() ( #2041 )
2021-01-26 21:17:36 -08:00
Glenn Jocher
59c21c7bcb
W&B log epoch ( #1946 )
...
* W&B log epoch
* capitalize
* W&B log epoch
* capitalize
* Update train.py
New try using https://docs.wandb.ai/library/log#incremental-logging
* Update train.py
* Update test.py
* Update train.py
* Update plots.py
* Update train.py
* Update train.py
* label plot step -1
* update
* update
* update
* update
* update
* update
* Update train.py
* Update train.py
2021-01-26 21:16:01 -08:00
Glenn Jocher
08d3119e09
Add histogram equalization fcn ( #2049 )
2021-01-26 17:30:42 -08:00
Glenn Jocher
8fcbe43423
Check im.format during dataset caching ( #2042 )
...
* Check im.format during dataset caching
* Update datasets.py
2021-01-25 20:55:35 -08:00
Glenn Jocher
3b7feeafdf
Update general.py check_git_status() fix ( #2020 )
2021-01-22 15:59:01 -08:00
Glenn Jocher
aac33f87ad
Update inference multiple-counting ( #2019 )
...
* Update inference multiple-counting
* update github check
2021-01-22 15:39:08 -08:00
Glenn Jocher
77fd83225f
Update google_utils.py ( #2017 )
2021-01-22 15:08:42 -08:00
Glenn Jocher
1445ab2b27
check_git_status() Windows fix ( #2015 )
...
* check_git_status() Windows fix
* Update general.py
* Update general.py
* Update general.py
* Update general.py
* Update general.py
* Update general.py
2021-01-22 12:37:12 -08:00
Glenn Jocher
d9212140b3
Add xywhn2xyxy() ( #1983 )
2021-01-19 13:33:52 -08:00
Glenn Jocher
b1cf25dd9a
check_git_status() asserts ( #1977 )
2021-01-18 10:49:28 -08:00
Abhiram V
17751b9891
Update autoanchor.py with yaml.SafeLoader ( #1971 )
2021-01-18 10:47:42 -08:00
Abhiram V
35400dc7b7
Update plots.py with yaml.SafeLoader ( #1968 )
2021-01-18 10:46:20 -08:00
Glenn Jocher
b26a2f6242
check_git_status() when not exist /workspace ( #1966 )
2021-01-17 11:55:25 -08:00
Glenn Jocher
e8a41e8916
prevent check_git_status() in docker images ( #1951 )
...
* prevent check_git_status() running docker images
* Update general.py
2021-01-16 01:15:38 -08:00
Glenn Jocher
ca9babb8e6
Add ComputeLoss() class ( #1950 )
2021-01-15 13:50:24 -08:00
Glenn Jocher
b75c432ea0
GitHub API rate limit fallback ( #1930 )
2021-01-13 21:09:50 -08:00
Glenn Jocher
051e9e80de
check_git_status() bug fix ( #1925 )
2021-01-13 10:25:53 -08:00
Glenn Jocher
509dd51aca
check_git_status() improvements ( #1916 )
...
* check_online()
* Update general.py
* update check_git_status()
* reverse rev-parse order
* fetch
* improved responsiveness
* comment
* comment
* remove hyp['giou'] compat warning
2021-01-12 21:51:49 -08:00
Glenn Jocher
dd03b20ba5
colorstr() updates ( #1909 )
...
* W&B ImportError message fix
* colorstr() updates
* colorstr() updates
* colorstr() default to 'blue', 'bold'
* train: magenta
* train: blue
2021-01-12 10:33:15 -08:00
Glenn Jocher
1d1c0567a4
PyTorch Hub results.render() ( #1897 )
2021-01-10 20:06:11 -08:00
Glenn Jocher
ffef77124e
Update torch_utils.py ( #1895 )
2021-01-10 12:26:29 -08:00
Glenn Jocher
0f11aaf551
GitHub API rate limit newline ( #1894 )
2021-01-10 11:47:00 -08:00
Glenn Jocher
d06ad3bc3d
GitHub API rate limit fix ( #1894 )
2021-01-10 11:42:45 -08:00
Glenn Jocher
6ab589583c
Add colorstr() ( #1887 )
...
* Add colorful()
* update
* newline fix
* add git description
* --always
* update loss scaling
* update loss scaling 2
* rename to colorstr()
2021-01-09 15:24:18 -08:00
Glenn Jocher
fea9c9b80c
nn.SiLU() citation correction ( #1713 )
2021-01-06 20:58:41 -08:00
Glenn Jocher
e77c77f580
Add check_requirements() ( #1853 )
...
* Add check_requirements()
* add import
* parameterize filename
* add to detect, test
2021-01-06 16:35:40 -08:00
Tommy in Tongji
135ec5c5ce
W&B ID reset on training completion ( #1852 )
...
* Update train.py
Fix the bug of always the same W&B ID and continue overwrite with the old logging.
BUG report
https://github.com/ultralytics/yolov5/issues/1851
* Fix the bug of duplicate W&B ID
fix the bug of https://github.com/ultralytics/yolov5/issues/1851
If we had trained on yolov5s.pt, the program will generate a new unique W&B ID.
If we hadn't, the program will keep the old code, we can still use --resume aug.
* Update general.py
* revert train.py changes
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-01-06 16:27:22 -08:00
Glenn Jocher
69be8e738f
YOLOv5 v4.0 Release ( #1837 )
...
* Update C3 module
* Update C3 module
* Update C3 module
* Update C3 module
* update
* update
* update
* update
* update
* update
* update
* update
* update
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* updates
* update
* update
* update
* update
* updates
* updates
* updates
* updates
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update datasets
* update
* update
* update
* update attempt_downlaod()
* merge
* merge
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* parameterize eps
* comments
* gs-multiple
* update
* max_nms implemented
* Create one_cycle() function
* update
* update
* update
* update
* update
* update
* update
* update study.png
* update study.png
* Update datasets.py
2021-01-04 19:54:09 -08:00
Glenn Jocher
0e341c5660
Create one_cycle() function ( #1836 )
2021-01-04 15:49:08 -08:00
Glenn Jocher
9f5a18bb80
Torch CUDA synchronize update ( #1826 )
...
* torch.cuda.synchronize() update
* torch.cuda.synchronize() update
* torch.cuda.synchronize() update
* newline
2021-01-03 11:23:12 -08:00
Glenn Jocher
c0ffcdf998
Display correct CUDA devices ( #1776 )
...
* Display correct CUDA devices
* cleanup
2020-12-24 13:01:35 -08:00