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

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
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
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
Glenn Jocher
e5d71223b8
Update README.md
2021-04-15 16:45:50 +02:00
Glenn Jocher
1487bc84ff
Update README.md
2021-04-12 13:27:40 +02:00
Glenn Jocher
860ca98832
Created using Colaboratory
2021-04-12 13:10:08 +02:00
Glenn Jocher
cac8a765c8
Created using Colaboratory
2021-04-12 13:02:40 +02:00
Glenn Jocher
2eab46e2cf
Update tutorial.ipynb
2021-04-12 12:33:04 +02:00
Glenn Jocher
6b718e9127
Created using Colaboratory
2021-04-12 12:31:28 +02:00
Glenn Jocher
54d65160b7
Update tutorial.ipynb
2021-04-12 12:26:28 +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
Glenn Jocher
9029759cb3
Created using Colaboratory
2021-04-11 16:28:32 +02:00
Glenn Jocher
6dd1083bbb
Tensorboard model visualization bug fix ( #2758 )
...
This fix should allow for visualizing YOLOv5 model graphs correctly in Tensorboard by uncommenting line 335 in train.py:
```python
if tb_writer:
tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), []) # add model graph
```
The problem was that the detect() layer checks the input size to adapt the grid if required, and tracing does not seem to like this shape check (even if the shape is fine and no grid recomputation is required). The following will warn:
https://github.com/ultralytics/yolov5/blob/0cae7576a9241110157cd154fc2237e703c2719e/train.py#L335
Solution is below. This is a YOLOv5s model displayed in TensorBoard. You can see the Detect() layer merging the 3 layers into a single output for example, and everything appears to work and visualize correctly.
```python
tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), [])
```
<img width="893" alt="Screenshot 2021-04-11 at 01 10 09" src="https://user-images.githubusercontent.com/26833433/114286928-349bd600-9a63-11eb-941f-7139ee6cd602.png ">
2021-04-11 01:33:55 +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
b5de52c4cd
torch.cuda.amp bug fix ( #2750 )
...
PR https://github.com/ultralytics/yolov5/pull/2725 introduced a very specific bug that only affects multi-GPU trainings. Apparently the cause was using the torch.cuda.amp decorator in the autoShape forward method. I've implemented amp more traditionally in this PR, and the bug is resolved.
2021-04-09 18:19:49 +02:00
Glenn Jocher
fca5e2a48f
autocast enable=torch.cuda.is_available() ( #2748 )
2021-04-09 13:34:49 +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
Glenn Jocher
c8c8da6079
Update README with collapsable notes ( #2721 )
...
* Update README with collapsable notes.
* cleanup
* center table
2021-04-06 17:54:47 +02:00
Glenn Jocher
ec8979f1d2
Updated filename attributes for YOLOv5 Hub BytesIO ( #2718 )
...
Fix 2 for 'Model predict with forward will fail if PIL image does not have filename attribute' #2702
2021-04-06 13:18:56 +02:00
Glenn Jocher
74276d5189
Updated filename attributes for YOLOv5 Hub results ( #2708 )
...
Proposed fix for 'Model predict with forward will fail if PIL image does not have filename attribute' #2702
2021-04-05 22:20:09 +02:00
Glenn Jocher
9ccfa85249
pip install coremltools onnx ( #2690 )
...
Requested in https://github.com/ultralytics/yolov5/issues/2686
2021-04-02 13:00:46 +02:00
Glenn Jocher
17300a4c7b
autoShape forward im = np.asarray(im) # to numpy ( #2689 )
...
Slight speedup.
2021-04-02 12:36:38 +02:00
Glenn Jocher
2af059c0d8
PyTorch Hub model.save() increment as runs/hub/exp ( #2684 )
...
* PyTorch Hub model.save() increment as runs/hub/exp
This chane will align PyTorch Hub results saving with the existing unified results saving directory structure of
runs/
/train
/detect
/test
/hub
/exp
/exp2
...
* cleanup
2021-04-02 11:55:10 +02:00
Glenn Jocher
b8b862993d
Update README with Tips for Best Results tutorial ( #2682 )
...
* Update README with Tips for Best Results tutorial
* Update README.md
2021-04-01 15:01:00 +02:00