Jirka Borovec
c3d5ac151e
precommit: yapf ( #5494 )
* precommit: yapf
* align isort
* fix
# Conflicts:
# utils/plots.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update setup.cfg
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update setup.cfg
* Update setup.cfg
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update wandb_utils.py
* Update augmentations.py
* Update setup.cfg
* Update yolo.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update val.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* simplify colorstr
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* val run fix
* export.py last comma
* Update export.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update hubconf.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* PyTorch Hub tuple fix
* PyTorch Hub tuple fix2
* PyTorch Hub tuple fix3
* Update setup
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>
před 2 roky
Glenn Jocher
6134ec5d94
Model summary `pathlib` fix ( #7104 )
Stems not working correctly for YOLOv5l with current .rstrip() implementation. After fix:
```
YOLOv5l summary: 468 layers, 46563709 parameters, 46563709 gradients, 109.3 GFLOPs
```
před 2 roky
Glenn Jocher
a600baed8e
Update model summary to display model name ( #7101 )
před 2 roky
Glenn Jocher
6dd82c0252
Move `git_describe()` to general.py ( #6918 )
* Move `git_describe()` to general.py
* Move `git_describe()` to general.py
před 2 roky
Glenn Jocher
e6e36aac10
Update bytes to GB with bitshift ( #6886 )
před 2 roky
Glenn Jocher
0f819919ad
Update EMA decay `tau` ( #6769 )
* Update EMA
* Update EMA
* ratio invert
* fix ratio invert
* fix2 ratio invert
* warmup iterations to 100
* ema_k
* implement tau
* implement tau
před 2 roky
Glenn Jocher
4de8b24881
Suppress `torch` AMP-CPU warnings ( #6706 )
This is a torch bug, but they seem unable or unwilling to fix it so I'm creating a suppression in YOLOv5.
Resolves https://github.com/ultralytics/yolov5/issues/6692
před 2 roky
Jirka Borovec
cba4303d32
Fix 6 Flake8 issues ( #6541 )
* F541
* F821
* F841
* E741
* E302
* E722
* Apply suggestions from code review
* Update general.py
* Update datasets.py
* Update export.py
* Update plots.py
* Update plots.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 2 roky
Glenn Jocher
d8b5beb0b0
Fix2 `select_device()` for Multi-GPU ( #6461 )
* Fix2 select_device() for Multi-GPU
* Cleanup
* Cleanup
* Simplify error message
* Improve assert
* Update torch_utils.py
před 2 roky
Glenn Jocher
856d4e5733
Fix `select_device()` for Multi-GPU ( #6434 )
* Fix `select_device()` for Multi-GPU
Possible fix for https://github.com/ultralytics/yolov5/issues/6431
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
před 2 roky
imyhxy
4e841b9b16
Reuse `de_parallel()` rather than `is_parallel()` ( #6354 )
před 2 roky
Glenn Jocher
436ffc417a
`select_device()` cleanup ( #6302 )
* `select_device()` cleanup
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
* Update torch_utils.py
před 2 roky
Henry
a1a9c6884c
Fixing bug multi-gpu training ( #6299 )
* Fixing bug multi-gpu training
This solves this issue: https://github.com/ultralytics/yolov5/issues/6297#issue-1103853348
* Update torch_utils.py for pep8
před 2 roky
Glenn Jocher
e7bf38277f
Fix `device` count check ( #6290 )
* Fix device count check()
* Update torch_utils.py
* Update torch_utils.py
* Update hubconf.py
před 2 roky
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>
před 2 roky
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>
před 3 roky
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>
před 3 roky
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>
před 3 roky
Glenn Jocher
e189fa15ea
`intersect_dicts()` in hubconf.py fix ( #5542 )
před 3 roky
Glenn Jocher
5866646cc8
Fix float zeros format ( #5491 )
* Fix float zeros format
* 255 to integer
před 3 roky
Glenn Jocher
84a8099b75
Update torch_utils.py import `LOGGER` ( #5483 )
před 3 roky
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
před 3 roky
Glenn Jocher
5d4258fac5
Fix MixConv2d() remove shortcut + apply depthwise ( #5410 )
před 3 roky
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>
před 3 roky
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
před 3 roky
Glenn Jocher
441b47c443
More informative `EarlyStopping()` message ( #5303 )
před 3 roky
Glenn Jocher
84bfa89236
Consolidate `init_seeds()` ( #4849 )
před 3 roky
Glenn Jocher
548745181a
EarlyStopper updates ( #4679 )
před 3 roky
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
před 3 roky
Glenn Jocher
19d03a955c
Remove DDP process group timeout ( #4422 )
před 3 roky
Glenn Jocher
24bea5e4b7
Standardize headers and docstrings ( #4417 )
* Implement new headers
* Reformat 1
* Reformat 2
* Reformat 3 - math
* Reformat 4 - yaml
před 3 roky
imyhxy
771ac6c53d
Fixed logging level in distributed mode ( #4284 )
Co-authored-by: fkwong <huangfuqiang@transai.cn>
před 3 roky
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
před 3 roky
Glenn Jocher
9468657502
Update profiler ( #4236 )
před 3 roky
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>
před 3 roky
Glenn Jocher
6a3ee7cf03
Hub models `map_location=device` ( #3894 )
* Hub models `map_location=device`
* cleanup
před 3 roky
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
před 3 roky
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
před 3 roky
Glenn Jocher
f3c3d2ce5d
Merge `develop` branch into `master` ( #3518 )
* update ci-testing.yml (#3322 )
* update ci-testing.yml
* update greetings.yml
* bring back os matrix
* update ci-testing.yml (#3322 )
* update ci-testing.yml
* update greetings.yml
* bring back os matrix
* 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
* Update tutorial.ipynb (#3368 )
add Open in Kaggle badge
* `cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379 )
* Update datasets.py
* comment
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* COCO evolution fix (#3388 )
* COCO evolution fix
* cleanup
* update print
* print fix
* 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
```
* Revert "`cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379 )" (#3395 )
This reverts commit 21a9607e00
.
* Update FLOPs description (#3422 )
* Update README.md
* Changing FLOPS to FLOPs.
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
* Parse URL authentication (#3424 )
* Parse URL authentication
* urllib.parse.unquote()
* improved error handling
* improved error handling
* remove %3F
* update check_file()
* Add FLOPs title to table (#3453 )
* Suppress jit trace warning + graph once (#3454 )
* Suppress jit trace warning + graph once
Suppress harmless jit trace warning on TensorBoard add_graph call. Also fix multiple add_graph() calls bug, now only on batch 0.
* Update train.py
* Update MixUp augmentation `alpha=beta=32.0` (#3455 )
Per VOC empirical results https://github.com/ultralytics/yolov5/issues/3380#issuecomment-853001307 by @developer0hye
* Add `timeout()` class (#3460 )
* Add `timeout()` class
* rearrange order
* Faster HSV augmentation (#3462 )
remove datatype conversion process that can be skipped
* 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
* Improved `check_requirements()` offline-handling (#3466 )
Improve robustness of `check_requirements()` function to offline environments (do not attempt pip installs when offline).
* Add `output_names` argument for ONNX export with dynamic axes (#3456 )
* Add output names & dynamic axes for onnx export
Add output_names and dynamic_axes names for all outputs in torch.onnx.export. The first four outputs of the model will have names output0, output1, output2, output3
* use first output only + cleanup
Co-authored-by: Samridha Shrestha <samridha.shrestha@g42.ai>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Revert FP16 `test.py` and `detect.py` inference to FP32 default (#3423 )
* fixed inference bug ,while use half precision
* replace --use-half with --half
* replace space and PEP8 in detect.py
* PEP8 detect.py
* update --half help comment
* Update test.py
* revert space
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Add additional links/resources to stale.yml message (#3467 )
* Update stale.yml
* cleanup
* Update stale.yml
* reformat
* Update stale.yml HUB URL (#3468 )
* Stale `github.actor` bug fix (#3483 )
* Explicit `model.eval()` call `if opt.train=False` (#3475 )
* call model.eval() when opt.train is False
call model.eval() when opt.train is False
* single-line if statement
* cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* check_requirements() exclude `opencv-python` (#3495 )
Fix for 3rd party or contrib versions of installed OpenCV as in https://github.com/ultralytics/yolov5/issues/3494 .
* Earlier `assert` for cpu and half option (#3508 )
* early assert for cpu and half option
early assert for cpu and half option
* Modified comment
Modified comment
* Update tutorial.ipynb (#3510 )
* Reduce test.py results spacing (#3511 )
* Update README.md (#3512 )
* Update README.md
Minor modifications
* 850 width
* Update greetings.yml
revert greeting change as PRs will now merge to master.
Co-authored-by: Piotr Skalski <SkalskiP@users.noreply.github.com>
Co-authored-by: SkalskiP <piotr.skalski92@gmail.com>
Co-authored-by: Peretz Cohen <pizzaz93@users.noreply.github.com>
Co-authored-by: tudoulei <34886368+tudoulei@users.noreply.github.com>
Co-authored-by: chocosaj <chocosaj@users.noreply.github.com>
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Sam_S <SamSamhuns@users.noreply.github.com>
Co-authored-by: Samridha Shrestha <samridha.shrestha@g42.ai>
Co-authored-by: edificewang <609552430@qq.com>
před 3 roky
chocosaj
3cb9ad4fc4
Update FLOPs description ( #3422 )
* Update README.md
* Changing FLOPS to FLOPs.
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
před 3 roky
Glenn Jocher
aad99b63d6
TensorBoard DP/DDP graph fix ( #3325 )
před 3 roky
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.
před 3 roky
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
před 3 roky
Glenn Jocher
2e95cf3d79
Improve git_describe() fix 1 ( #2635 )
Add stderr=subprocess.STDOUT to catch error messages.
před 3 roky
Glenn Jocher
6e8c5b7678
Improve git_describe() ( #2633 )
Catch 'fatal: not a git repository' returns and return '' instead (observed in GCP Hub checks).
před 3 roky
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
...
```
před 3 roky
Glenn Jocher
77415a42e5
Update git_describe() for remote dir usage ( #2606 )
před 3 roky
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
před 3 roky
Glenn Jocher
f01f3223d5
Integer printout ( #2450 )
* Integer printout
* test.py 'Labels'
* Update train.py
před 3 roky
xiaowo1996
83dc1b4484
FLOPS min stride 32 ( #2276 )
Signed-off-by: xiaowo1996 <429740343@qq.com>
před 3 roky