Commit Graph

1958 Commits (23718df1c6b546e525d06a6e2f6a4ebc9737bb4b)
 

Author SHA1 Message Date
Philip Gutjahr 529fbc1814
Use PIL to eliminate chroma subsampling in crops (#7008)
* use pillow to save higher-quality jpg (w/o color subsampling)

* Cleanup and doc issue

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-20 15:46:29 +01:00
Glenn Jocher 9f4d11379b
Fix incomplete URL substring sanitation (#7056)
Resolves code scanning alert in https://github.com/ultralytics/yolov5/issues/7055
2022-03-20 14:18:05 +01:00
Glenn Jocher 6843ea5d7f
Create SECURITY.md (#7054)
* Create SECURITY.md

Resolves https://github.com/ultralytics/yolov5/issues/7052

* Move into ./github

* Update SECURITY.md
2022-03-20 13:55:32 +01:00
Glenn Jocher 9ebec7885f
Update Dockerfile to `git clone` instead of `COPY` (#7053)
Resolves git command errors that currently happen in image, i.e.:

```bash
root@382ae64aeca2:/usr/src/app# git pull
Warning: Permanently added the ECDSA host key for IP address '140.82.113.3' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```
2022-03-20 13:51:22 +01:00
Glenn Jocher b0ba101ac0
`ComputeLoss()` indexing/speed improvements (#7048)
* device as class attribute

* Update loss.py

* Update loss.py

* improve zeros

* tensor split
2022-03-20 01:04:48 +01:00
Mrinal Jain 4effd064b1
Consistent saved_model output format (#7032) 2022-03-18 12:29:24 +01:00
Max Strobel 7c6a33564a
fix: add default PIL font as fallback (#7010)
* fix: add default font as fallback

Add default font as fallback if the downloading of the Arial.ttf font
fails for some reason, e.g. no access to public internet.

* Update plots.py

Co-authored-by: Maximilian Strobel <Maximilian.Strobel@infineon.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-17 16:37:09 +01:00
Glenn Jocher 3f634d43c8
Conditional `Timeout()` by OS (disable on Windows) (#7013)
* Conditional `Timeout()` by OS (disable on Windows)

* Update general.py
2022-03-16 15:33:54 +01:00
Glenn Jocher c09fb2aa95
Update TQDM bar format (#6988) 2022-03-15 16:32:56 +01:00
Glenn Jocher 932dc78496
YOLOv5 Export Benchmarks for GPU (#6963)
* Add benchmarks.py GPU support

* Updates

* Updates

* Updates

* Updates

* Add --half

* Add TRT requirements

* Cleanup

* Add TF to warmup types

* Update export.py

* Update export.py

* Update benchmarks.py
2022-03-14 15:07:13 +01:00
Glenn Jocher 99de551f97
pt model to cpu on TF export 2022-03-14 12:41:06 +01:00
Glenn Jocher 2d45de617e
Model `ema` key backward compatibility fix (#6972)
Fix for older model loading issue in d3d9cbce22 (commitcomment-68622388)
2022-03-14 10:54:51 +01:00
paradigm c13d4ce7ef
EdgeTPU optimizations (#6808)
* removed transpose op for better edgetpu support

* fix for training case

* enabled experimental new quantizer flag

* precalculate add and mul ops at compile time

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-12 16:15:09 +01:00
Glenn Jocher 701e1177ac
Tensor initialization on device improvements (#6959)
* Update common.py speed improvements

Eliminate .to() ops where possible for reduced data transfer overhead. Primarily affects warmup and PyTorch Hub inference.

* Updates

* Updates

* Update detect.py

* Update val.py
2022-03-12 14:00:48 +01:00
Glenn Jocher 52c1399fdc
DetectMultiBackend() return `device` update (#6958)
Fixes ONNX validation that returns outputs on CPU.
2022-03-12 13:16:29 +01:00
Glenn Jocher c84dd27d62
New val.py `cuda` variable (#6957)
* New val.py `cuda` variable

Fix for ONNX GPU val.

* Update val.py
2022-03-12 12:57:08 +01:00
Glenn Jocher c6b4f84fd1
Update Dockerfile `torch==1.11.0+cu113` (#6954) 2022-03-12 00:45:07 +01:00
Glenn Jocher b94b59e199
DetectMultiBackend() `--half` handling (#6945)
* DetectMultiBackend() `--half` handling

* CI fixes

* rename .half to .fp16 to avoid conflict

* warmup fix

* val update

* engine update

* engine update
2022-03-11 16:31:52 +01:00
Glenn Jocher 84efa62b2d
Fix PyTorch Hub export inference shapes (#6949)
May resolve https://github.com/ultralytics/yolov5/issues/6947
2022-03-11 16:18:40 +01:00
Glenn Jocher caf7ad0500
Allow 3-point segments (#6938)
May resolve https://github.com/ultralytics/yolov5/issues/6931
2022-03-10 18:41:47 +01:00
Glenn Jocher 055e72af5b
Optimize PyTorch 1.11.0 compatibility update (#6933) 2022-03-10 12:58:41 +01:00
Glenn Jocher d3d9cbce22
PyTorch 1.11.0 compatibility updates (#6932)
Resolves `AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'` first raised in https://github.com/ultralytics/yolov5/issues/5499
2022-03-10 12:41:06 +01:00
Glenn Jocher 6dd82c0252
Move `git_describe()` to general.py (#6918)
* Move `git_describe()` to general.py

* Move `git_describe()` to general.py
2022-03-09 18:22:53 +01:00
Glenn Jocher e6e36aac10
Update bytes to GB with bitshift (#6886) 2022-03-07 19:26:37 +01:00
Glenn Jocher acc58c1dcf
Fix TRT `max_workspace_size` deprecation notice (#6856)
* Fix TRT `max_workspace_size` deprecation notice

* Update export.py

* Update export.py
2022-03-07 13:52:53 +01:00
dependabot[bot] a5a1760ea6
Bump actions/checkout from 2 to 3 (#6881)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 13:49:27 +01:00
dependabot[bot] c8a589920e
Bump actions/setup-python from 2 to 3 (#6880)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 13:48:59 +01:00
DavidB 596de6d5a0
Default FP16 TensorRT export (#6798)
* Assert engine precision #6777

* Default to FP32 inputs for TensorRT engines

* Default to FP16 TensorRT exports #6777

* Remove wrong line #6777

* Automatically adjust detect.py input precision #6777

* Automatically adjust val.py input precision #6777

* Add missing colon

* Cleanup

* Cleanup

* Remove default trt_fp16_input definition

* Experiment

* Reorder detect.py if statement to after half checks

* Update common.py

* Update export.py

* Cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-06 21:21:16 +01:00
vnekat 7e98b4801a
Update yolov5s.yaml (#6865)
* Update yolov5s.yaml

* Update yolov5s.yaml

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-06 20:20:01 +01:00
Glenn Jocher 4728840745
Update `--cache disk` deprecate `*_npy/` dirs (#6876)
* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Cleanup

* Cleanup
2022-03-06 16:16:17 +01:00
Glenn Jocher 8a66ebad44
Add `*.ts` to `VID_FORMATS` (#6859) 2022-03-04 14:10:13 +01:00
Glenn Jocher 601dbb83f0
AutoAnchor improved initialization robustness (#6854)
* Update AutoAnchor

* Update AutoAnchor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-04 10:32:18 +01:00
Louis Combaldieu bcc92e2169
Update sweep.yaml (#6825)
* Update sweep.yaml

Changed focal loss gamma search range between 1 and 4

* Update sweep.yaml

lowered the min value to match default
2022-03-04 09:39:23 +01:00
Glenn Jocher 63ddb6f0d0
Update autoanchor.py (#6794)
* Update autoanchor.py

* Update autoanchor.py
2022-02-26 19:15:12 +01:00
Glenn Jocher c2403eb04c
Update PULL_REQUEST_TEMPLATE.md (#6783) 2022-02-25 14:01:58 +01:00
Glenn Jocher 9ec51a6396
YOLOv5s6 params FLOPs fix (#6782) 2022-02-25 13:59:21 +01:00
Glenn Jocher 0f819919ad
Update EMA decay `tau` (#6769)
* Update EMA

* Update EMA

* ratio invert

* fix ratio invert

* fix2 ratio invert

* warmup iterations to 100

* ema_k

* implement tau

* implement tau
2022-02-25 12:33:09 +01:00
Louis Combaldieu b2adc7c39a
Fix export for 1-channel images (#6780)
Export failed for 1-channel input shape, 1-liner fix
2022-02-25 10:56:37 +01:00
Glenn Jocher cea994b3f6
Update hyp.VOC.yaml (#6772) 2022-02-25 00:14:17 +01:00
Glenn Jocher 741cd0eb23
Update tutorial.ipynb (#6771) 2022-02-25 00:12:27 +01:00
Glenn Jocher c161557563
Default `OMP_NUM_THREADS=8` (#6770) 2022-02-25 00:09:14 +01:00
Glenn Jocher 47f265dde2
Update min warmup iterations from 1k to 100 (#6768) 2022-02-24 23:37:25 +01:00
Glenn Jocher 4bab56526b
Update tutorial.ipynb (2 CPUs, 12.7 GB RAM, 42.2/166.8 GB disk) (#6767) 2022-02-24 18:29:59 +01:00
Glenn Jocher 66aaf5184d
Pre-commit table fix (#6744) 2022-02-22 19:35:31 +01:00
Glenn Jocher 3752807c0b
YOLOv5 v6.1 release (#6739) 2022-02-22 12:35:24 +01:00
Glenn Jocher 2692e67c5f
Updated VOC hyperparameters (#6732)
* Update hyps

* Update hyp.VOC.yaml

* Update pathlib

* Update hyps

* Update hyps

* Update hyps

* Update hyps
2022-02-22 12:11:18 +01:00
Glenn Jocher a936f5f219
Switch default LR scheduler from cos to linear (#6729)
* Switch default LR scheduler from cos to linear

Based on empirical results of training both ways on all YOLOv5 models.

* linear bug fix
2022-02-21 14:23:27 +01:00
Jirka Borovec dbbb57cf0b
GH: add PR template (#6482)
* GH: add PR template

* Update CONTRIBUTING.md

* Update PULL_REQUEST_TEMPLATE.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

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>
2022-02-21 12:36:43 +01:00
Glenn Jocher c43f135571
Update `nw` to `max(nd, 1)` (#6714) 2022-02-20 21:47:46 +01:00
Glenn Jocher 4de8b24881
Suppress `torch` AMP-CPU warnings (#6706)
This is a torch bug, but they seem unable or unwilling to fix it so I'm creating a suppression in YOLOv5. 

Resolves https://github.com/ultralytics/yolov5/issues/6692
2022-02-19 16:48:33 +01:00