Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Jocher c058a61e3b Update greetings.yml
revert greeting change as PRs will now merge to master.
2021-06-08 10:11:06 +02:00
Glenn Jocher abb2a96e91 Update README.md (#3512)
* Update README.md

Minor modifications

* 850 width
2021-06-08 00:39:02 +02:00
Glenn Jocher d986145b9a Reduce test.py results spacing (#3511) 2021-06-07 23:21:34 +02:00
Glenn Jocher eede7dc48c Update tutorial.ipynb (#3510) 2021-06-07 22:52:16 +02:00
Glenn Jocher 90b7895d65 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.
2021-06-07 10:03:47 +02:00
Glenn Jocher cf4f95bc5f Stale github.actor bug fix (#3483) 2021-06-06 18:06:24 +02:00
Glenn Jocher 3597d280ee Update stale.yml HUB URL (#3468) 2021-06-04 23:49:43 +02:00
Glenn Jocher 739451da5a Add additional links/resources to stale.yml message (#3467)
* Update stale.yml

* cleanup

* Update stale.yml

* reformat
2021-06-04 23:45:24 +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
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 4aa2959101 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
2021-06-04 12:37:41 +02:00
Glenn Jocher af2bc3a1c3 Add FLOPs title to table (#3453) 2021-06-04 11:46:40 +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
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
Glenn Jocher 4b52e19a61 COCO evolution fix (#3388)
* COCO evolution fix

* cleanup

* update print

* print fix
2021-05-29 22:49:34 +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 1f8d716ec9 yolo.py header (#3347) 2021-05-26 12:06:08 +02:00
Glenn Jocher aad99b63d6 TensorBoard DP/DDP graph fix (#3325) 2021-05-25 11:45:24 +02:00
Glenn Jocher 407dc5008e Update README.md (#3320) 2021-05-24 17:17:32 +02:00
Glenn Jocher 61ea23c3fe Implement @torch.no_grad() decorator (#3312)
* `@torch.no_grad()` decorator

* Update detect.py
2021-05-24 13:23:09 +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
Glenn Jocher ee24ae11ea Comment Cython (#3297)
Ultralytics REST API fix.
2021-05-23 17:53:54 +02:00
Glenn Jocher 0e2f2cbb51 Update LoadStreams init fallbacks (#3295) 2021-05-23 14:55:42 +02:00
Glenn Jocher dd7f0b7e05 Fix TypeError: 'PosixPath' object is not iterable (#3285) 2021-05-21 23:35:31 +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
Glenn Jocher 10d56d784e Assert --image-weights not combined with DDP (#3275) 2021-05-21 14:46:42 +02:00
Glenn Jocher 7b36e38cf8 Check CoreML models.train() mode (#3262)
* Check CoreML models.train() mode

* Update export.py
2021-05-20 15:22:36 +02:00
Glenn Jocher 7b863a34dc Add Cython (#3217)
Cython required by pycocotools in certain cases, i.e. https://github.com/cocodataset/cocoapi/issues/172
2021-05-19 19:58:53 +02:00
Glenn Jocher b7cd1f540d TensorBoard add_graph() fix (#3236) 2021-05-19 13:51:55 +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 17b0f71538 SKU-110K CVPR2019 Dataset Auto-Download (#3167)
* SKU-110K CVPR2019 Dataset Auto-Download

This PR adds the **SKU-110K CVPR2019 Dataset** https://github.com/eg4000/SKU110K_CVPR19 to the list of YOLOv5 🚀  auto-download list.

- [x] [COCO](https://cocodataset.org/#home)
- [x] [COCO128](https://www.kaggle.com/ultralytics/coco128)
- [x] [VOC](http://host.robots.ox.ac.uk/pascal/VOC/)
- [x] [Argoverse-HD](http://www.cs.cmu.edu/~mengtial/proj/streaming/)
- [x] [VisDrone2019-DET](https://github.com/VisDrone/VisDrone-Dataset)
- [x] [GlobalWheat-2020](http://www.global-wheat.com/)
- [ ] [KITTI](https://www.kaggle.com/twaldo/kitti-object-detection)
- [x] [SKU110](https://github.com/eg4000/SKU110K_CVPR19) (grocery store items)
- [ ] [CityScapes](https://www.cityscapes-dataset.com/)
- [x] [Objects365](https://www.objects365.org/overview.html)
- [ ] [OpenImages](https://storage.googleapis.com/openimages/web/index.html)

```yaml
# SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19
# Train command: python train.py --data SKU-110K.yaml
# Default dataset location is next to YOLOv5:
#   /parent_folder
#     /datasets/SKU-110K
#     /yolov5
```

* Update SKU-110K.yaml

* Update SKU-110K.yaml
2021-05-14 17:05:26 +02:00
Glenn Jocher 06372b1465 Scope all hubconf.py imports for torch.hub.list() (#3145)
* Scope all hubconf.py imports for torch.hub.list()

* Update hubconf.py
2021-05-12 20:28:26 +02:00
Glenn Jocher 1935266951 Scope imports for torch.hub.list() improvement (#3144) 2021-05-12 20:18:32 +02:00
Glenn Jocher b098600763 Update requirements.txt onnx>=1.9.0 (#3143) 2021-05-12 19:56:12 +02:00
Glenn Jocher f12cef85a3 TorchScript, ONNX, CoreML Export tutorial title (#3142) 2021-05-12 19:49:12 +02:00
Glenn Jocher 7918eed040 Update https://ultralytics.com/images/zidane.jpg (#3140) 2021-05-12 18:30:31 +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 25f8ab835e detect.py streaming source --save-crop bug fix (#3102)
* detect.py streaming source --save-crop bug fix

Possible fix for #3100.

* () parenthesis
2021-05-10 16:39:37 +02:00
Glenn Jocher d6a71ae5f2 Update GlobalWheat2020.yaml test: # 1276 images (#3101) 2021-05-10 16:04:10 +02:00
Glenn Jocher 60fe54449d Update train.py (#3099) 2021-05-10 15:26:23 +02:00
Glenn Jocher 525f4f86a9 Add --optimize argument (#3093)
Fix for c++ runtime errors in https://github.com/ultralytics/yolov5/issues/2973
2021-05-10 12:13:44 +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
Glenn Jocher 91547edec1 Update detect.py (#3087)
* Update detect.py

* Update detect.py
2021-05-09 13:01:58 +02:00
Glenn Jocher 251aeafcb1 Update P5 + P6 model ensembling (#3082) 2021-05-08 19:06:12 +02:00
Glenn Jocher e97d129db4 Update export.py with --train mode argument (#3066) 2021-05-07 13:10:07 +02:00
Glenn Jocher 3ef3a95cfa Do not optimize CoreML TorchScript model (#3055) 2021-05-06 17:23:33 +02:00
Glenn Jocher 85b6fdda0f FROM nvcr.io/nvidia/pytorch:21.03-py3
Issues with 21.04
2021-05-05 01:00:12 +02:00
Glenn Jocher 4c7d686d7e FROM nvcr.io/nvidia/pytorch:21.04-py3 (#3030) 2021-05-05 00:16:35 +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 7c89c829e3 cleanup 2021-05-01 17:48:12 +02:00
Glenn Jocher c1a44ed9c5 Update hubconf.py for unified loading (#3005) 2021-05-01 17:35:02 +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 f55730ee9c Objects365 bug fix 2021-05-01 01:03:09 +02:00
Glenn Jocher 54652fe3ff Objects365 update 2021-05-01 00:16:58 +02:00
Glenn Jocher d08575ee5e PyTorch Hub load directly when possible (#2986) 2021-04-30 14:59:51 +02:00
Glenn Jocher 9b91db6d1a Created using Colaboratory 2021-04-30 13:15:31 +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 33712d6dd0 Global Wheat Detection 2020 Dataset Auto-Download (#2968)
* Create GlobalWheat2020.yaml

* Update and rename visdrone.yaml to VisDrone.yaml

* Update GlobalWheat2020.yaml
2021-04-28 20:11:02 +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 4200674a13 Add yolov5/ to sys.path() for *.py subdir exec (#2949)
* Add yolov5/ to sys.path() for *.py subdir exec

* Update export.py
2021-04-27 17:02:07 +02:00
Glenn Jocher 4890499344 Improved yolo.py profiling (#2940)
* Improved yolo.py profiling

Improved column order and labelling.

* Update yolo.py
2021-04-26 23:58:21 +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
Glenn Jocher 3665c0f59b test.py native --single-cls (#2928) 2021-04-25 20:05:16 +02:00
Glenn Jocher de19d396e7 Update visdrone.yaml (#2921) 2021-04-24 16:28:27 +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 646386ff09 Update export.py for 2 dry runs (#2910)
* Update export.py for 2 dry runs

* Update export.py
2021-04-24 00:10:38 +02:00
Glenn Jocher a2a514dec8 Update export.py (#2909) 2021-04-23 23:50:02 +02:00
Glenn Jocher 28db237639 Default optimize_for_mobile() on TorchScript models (#2908)
Per https://pytorch.org/tutorials/recipes/script_optimized.html this should improve performance on torchscript models (and maybe coreml models also since coremltools operates on a torchscript model input, though this still requires testing).
2021-04-23 21:21:58 +02:00
Glenn Jocher 14d2d2d75f Update google_utils.py (#2900) 2021-04-22 20:27:32 +02:00
Glenn Jocher cdb678f418 Update yolo.py (#2899) 2021-04-22 19:27:21 +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

![image](https://user-images.githubusercontent.com/5032208/115676962-a38dfe80-a382-11eb-9883-61fa3216e3e6.png)

The improvements are very significant:
![image](https://user-images.githubusercontent.com/5032208/115680180-eac9be80-a385-11eb-9c7a-8643db552c69.png)

## 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
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
Glenn Jocher f7bc685c2c Implement yaml.safe_load() (#2876)
* Implement yaml.safe_load()

* yaml.safe_dump()
2021-04-21 14:34:45 +02:00
Glenn Jocher c5c647e281 Update increment_path() to handle file paths (#2867) 2021-04-20 19:47:07 +02:00
Glenn Jocher 238583b7d5 Update FUNDING.yml (#2833)
* Update FUNDING.yml

* move FUNDING.yml to ./github
2021-04-18 14:40:58 +02:00
Glenn Jocher 803f51bcee Create FUNDING.yml (#2832) 2021-04-18 14:28:27 +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