Commit Graph

311 Commits (7e2139256143e2ae8befc392379f63cf97c3c061)

Author SHA1 Message Date
Glenn Jocher 5deff1471d
Add `ultralytics` pip package (#11529)
* Add ultralytics pip package

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

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

* Add requirements.txt locations

* Update requirements.txt

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-14 21:44:53 +02:00
Glenn Jocher b72efd2306
Fix `check_requirements()` txt not found bug (#11518)
Fix check_requirements() txt not found bug

@AyushExel @kalenmike fixes "requirements.txt" not found warning.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-05-11 18:50:06 +02:00
Glenn Jocher 60e29e2d86
Update check_requirements() (#11360)
Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-04-14 14:47:07 +02:00
Glenn Jocher 2118e3b88e
Update check_requirements.py (#11358)
Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-04-14 14:37:02 +02:00
Glenn Jocher 34cf749958
Update LICENSE to AGPL-3.0 (#11359)
* Update LICENSE to AGPL-3.0

This pull request updates the license of the YOLOv5 project from GNU General Public License v3.0 (GPL-3.0) to GNU Affero General Public License v3.0 (AGPL-3.0).

We at Ultralytics have decided to make this change in order to better protect our intellectual property and ensure that any modifications made to the YOLOv5 source code will be shared back with the community when used over a network.

AGPL-3.0 is very similar to GPL-3.0, but with an additional clause to address the use of software over a network. This change ensures that if someone modifies YOLOv5 and provides it as a service over a network (e.g., through a web application or API), they must also make the source code of their modified version available to users of the service.

This update includes the following changes:
- Replace the `LICENSE` file with the AGPL-3.0 license text
- Update the license reference in the `README.md` file
- Update the license headers in source code files

We believe that this change will promote a more collaborative environment and help drive further innovation within the YOLOv5 community.

Please review the changes and let us know if you have any questions or concerns.


Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update headers to AGPL-3.0

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-04-14 14:36:16 +02:00
Glenn Jocher f7c656278c
Update general.py (#11322)
* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

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

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

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-09 17:51:25 +02:00
Grzegorz K a82132c10b
Do not monkey-patch cv2 methods for unaware caller (#11210) 2023-03-30 11:39:11 +02:00
Grzegorz K f095258e0c
Sync signature of cv2.imread and cv2.imwrite (#11209)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-03-23 20:34:03 +01:00
Glenn Jocher 3c0a6e664b
Security fixes for IPython (#11069)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-02-25 16:15:07 -08:00
Glenn Jocher feca55719b
Update "YOLOv5 is out of date" msg (#11061) 2023-02-24 20:09:02 -08:00
Glenn Jocher 7a972e86c4
Update .pre-commit-config.yaml (#11009)
* Update .pre-commit-config.yaml

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

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

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

* Update __init__.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update .pre-commit-config.yaml

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Pre-commit updates

* Pre-commit updates

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-18 01:06:24 +01:00
Aarni Koskela a2de5c5bf6
Subprocess improvements (#10973)
* Use list-form arguments for subprocess.run calls where possible

Augments #10944

* Deduplicate curl code

* Avoid eval() to parse integer

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-02-13 18:00:31 +04:00
Aarni Koskela 1a2eb532ce
Fix return value check for subprocess.run (#10972)
Subprocess.run does not return an integer.

Regressed in #10944
2023-02-13 17:38:27 +04:00
Glenn Jocher 238da321cb
Security3 (#10944)
* Security improvements

* Security improvements

* [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>
2023-02-09 17:58:24 +04:00
Glenn Jocher 61407c93cc
Security improvements for subprocess.run() (#10943)
* Security improvements

* Security improvements

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

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

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-09 17:18:27 +04:00
Glenn Jocher e326252ee4
Security improvements (#10942)
* Security improvements

* Security improvements

* [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>
2023-02-09 16:57:18 +04:00
Yonghye Kwon 5545ff3545
Sort by confidence and remove excess boxes without explicit if (#10517)
* sort by confidence and remove excess boxes without explicit if

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>

* cleanup indexing boxes for remove excess boxes

it is related to https://github.com/ultralytics/yolov5/pull/10502.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-12-19 17:19:14 +01:00
Yonghye Kwon 2c35c1b318
Limit detections without explicit if condition (#10502)
* limit detections without explicit if condition

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>

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

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

* cleanup indexing code for limit detections

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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>
2022-12-18 13:03:01 +01:00
Yonghye Kwon 8d65f9d8ce
Support extensive shape for functions related to bounding box localization (#10516)
* support extensive shape for functions related to bounding box localization

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>

* merge exp branch updates

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-12-17 12:10:26 +01:00
Yonghye Kwon b564c1f365
Check `conf_thres` and `iou_thres` prior to use (#10515)
* Checks conf_thres and iou_thres at beign

Why checks conf_thres after operation with it?

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>

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

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

* Update general.py

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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>
2022-12-17 12:05:00 +01:00
Yonghye Kwon 443ef7f33e
Modify a comment for OpenCV File I/O Functions (#10467)
Modify comment for OpenCV File I/O Functions

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
2022-12-11 19:29:19 -08:00
Glenn Jocher a1b6e79ccf
Revert TQDM bar format changes (#10343)
Per https://github.com/ultralytics/yolov5/issues/10342

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-12-02 13:28:33 -08:00
Michael Ben ami 028b7cdb5a
fix_reading_nan_in_evolve (#10358)
when there is `nan` in evolve.csv pandas read it as str 
remove the space before fix that 

Signed-off-by: Michael Ben ami <31584614+mbenami@users.noreply.github.com>

Signed-off-by: Michael Ben ami <31584614+mbenami@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-12-01 12:44:14 -08:00
Glenn Jocher 40bb8030f8
Scope gitpyhon import in `check_git_info()` (#10221)
* Scope gitpyhon import in `check_git_info()`

* [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-11-19 14:22:07 +01:00
Glenn Jocher 9286336cb4
Add `git` info to training checkpoints (#9655)
* Add git status on train checkpoints

* Update

* Update

* Update

* Update

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

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

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-19 03:16:17 +01:00
Glenn Jocher 0322bb3196
New global `TQDM_BAR_FORMAT` (#10211)
* New global TQDM_BAR_FORMAT

* [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-11-18 21:39:13 +01:00
Glenn Jocher 467a57f01b
Segment prediction labels normalization fix (#10205)
* normalize_segments

* round remove

* swap axes fix
2022-11-18 14:19:46 +01:00
Ryan Echols ff6e6e328e
Fix: try 2 - prevent logging config clobbering (#10192)
* fix: try 2 - prevent logging config clobbering

Previous behavior: loading this repository with `torch.hub.load` clobbers the existing logging configuration by modifying the root logger's configuration.
New behavior: loading this repository with `torch.hub.load` only clobbers the logging configuration for logger `yolov5` and its descendants. This is done in a way compatible with Google Colab

Signed-off-by: Ryan Echols <ryan@shadylakemedia.com>

* chore: fill in comment

no-op so a pre-commit hook can auto-format files

Signed-off-by: Ryan Echols <ryan@shadylakemedia.com>

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

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

Signed-off-by: Ryan Echols <ryan@shadylakemedia.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-17 20:47:46 +01:00
Glenn Jocher 1510111b46
data.yaml `names.keys()` integer assert (#10190)
* data.yaml `names.keys()` integer assert

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-17 19:22:18 +01:00
Glenn Jocher e40662ffdd
Revert "fix: prevent logging config clobbering" (#10177)
Revert "fix: prevent logging config clobbering (#10133)"

This reverts commit 166b9f2fa7.
2022-11-16 19:06:19 +01:00
Ryan Echols 166b9f2fa7
fix: prevent logging config clobbering (#10133)
Previous behavior: loading this repository with `torch.hub.load` clobbers the existing logging configuration by modifying the root logger's configuration.
New behavior: loading this repository with `torch.hub.load` only clobbers the logging configuration for logger `yolov5` and its descendants.

Signed-off-by: Ryan Echols <ryan@shadylakemedia.com>

Signed-off-by: Ryan Echols <ryan@shadylakemedia.com>
2022-11-16 16:09:30 +01:00
Glenn Jocher fde7758468
YOLOv5 AutoCache Update (#10027)
* AutoCache

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

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

* AutoCache

* AutoCache

* AutoCache

* AutoCache

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-04 15:30:12 +01:00
Glenn Jocher 067ad9a2d1
Improved `check_online()` robustness (#10000)
* Improved check_online() robustness 

YOLOv5-wide improvement, not just in check_requirements()

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-01 15:55:18 +01:00
Glenn Jocher cf99788823
Check online twice on AutoUpdate (#9999)
Increased robustness to network failures

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-01 14:27:36 +01:00
Glenn Jocher 49156eb1d1
Fix `is_colab()` (#9994)
@AyushExel @kalenmike 

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-01 12:02:05 +01:00
Kalen Michael 575055ce70
Switch from suffix checks to archive checks (#9963)
* fix: switched from suffix checks to archive checks

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

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

* Cleanup

seems like both functions accept Path type input so removing str()

* import always

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>
2022-10-28 21:16:03 +02:00
SSTato fba61e5583
Windows Python 3.7 .isfile() fix (#9879)
* Update dataloaders.py

Signed-off-by: SSTato <1210546396@qq.com>

* Update general.py

Signed-off-by: SSTato <1210546396@qq.com>

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update dataloaders.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update dataloaders.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update general.py

Signed-off-by: SSTato <1210546396@qq.com>

* Update ci-testing.yml

Signed-off-by: SSTato <1210546396@qq.com>

* Update ci-testing.yml

Signed-off-by: SSTato <1210546396@qq.com>

* Update ci-testing.yml

Signed-off-by: SSTato <1210546396@qq.com>

* Update general.py

Signed-off-by: SSTato <1210546396@qq.com>

* Update general.py

Signed-off-by: SSTato <1210546396@qq.com>

* Update dataloaders.py

Signed-off-by: SSTato <1210546396@qq.com>

Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-10-24 16:20:47 +02:00
Glenn Jocher 6371de8879
Webcam show fix (#9847)
* Webcam show fix

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update common.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

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

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-18 22:26:53 +02:00
Glenn Jocher d0df6c8403
Update ZipFile to context manager (#9843)
* Update zipFile to context manager

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

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

* Cleanup

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

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

* Cleanup

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-18 16:35:04 +02:00
Glenn Jocher acff977af3
Logger Cleanup (#9828) 2022-10-17 15:30:42 +02:00
Glenn Jocher e3ff780676
Allow PyTorch Hub results to display in notebooks (#9825)
* Allow PyTorch Hub results to display in notebooks

* fix CI

* fix CI

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

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

* fix CI

* fix CI

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

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

* fix CI

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

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

* fix CI

* fix CI

* fix CI

* fix CI

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

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

* fix CI

* fix CI

* fix CI

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-17 14:34:33 +02:00
Glenn Jocher 16f87bb38e
HUB VOC fix (#9792)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-10-13 02:32:06 +02:00
Glenn Jocher 209be932de
Fix segment evolution keys (#9742)
* Update

* Cleanup
2022-10-09 23:51:29 +02:00
Glenn Jocher 2373d5470e
NMS MPS device wrapper (#9620)
* NMS MPS device wrapper

May resolve https://github.com/ultralytics/yolov5/issues/9613

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-27 18:02:48 +02:00
Glenn Jocher c4c0ee8fc3
Apple MPS -> CPU NMS fallback strategy (#9600)
Until more ops are fully supported this update will allow for seamless MPS inference (but slower MPS to CPU transfer before NMS, so slower NMS times).

Partially resolves https://github.com/ultralytics/yolov5/issues/9596

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-26 14:13:03 +02:00
Glenn Jocher 9006b41498
Add global YOLOv5_DATASETS_DIR (#9586)
Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-25 21:40:28 +02:00
Glenn Jocher c8e52304cf
New `scale_segments()` function (#9570)
* Rename scale_coords to scale_boxes

* add scale_segments
2022-09-24 16:02:41 +02:00
Glenn Jocher ca9c993d6c
Standardize warnings with `WARNING ⚠️ ...` (#9467)
* Standardize warnings

* [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-09-18 16:15:25 +02:00
Glenn Jocher 6a9fffd19a
Update general.py (#9454)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-17 15:42:24 +02:00
Glenn Jocher 4a4308001c
Do not move downloaded zips (#9455)
* Do not move downloaded zips

Prevent multiple downloads on HUB of same dataset

@kalenmike 

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update general.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-17 15:19:43 +02:00