Commit Graph

395 Commits (91547edec1a33121b3607e8c946e051514182b4f)

Author SHA1 Message Date
Ayush Chaurasia d2a17289c9
Explicitly convert artifact path to posix_path (#3067)
* Explicitly convert artifact path to posix_path

* Remove redudant str() casting
2021-05-07 19:53:56 +02:00
Ayush Chaurasia b18ca31ff5
use check_file for --data (#3035) 2021-05-05 14:28:19 +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 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 54652fe3ff Objects365 update 2021-05-01 00:16:58 +02:00
Ayush Chaurasia 801b469878
Improve performance of dataset Logger (#2943)
* Improve performance of Dataset Logger

* Fix scaling bug
2021-04-30 21:54:26 +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 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 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
NanoCode012 c0d3f80544
Add verbose option to pytorch hub models (#2926)
* Add verbose and update print to logging

* Fix positonal param

* Revert auto formatting changes

* Update hubconf.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-25 22:01:05 +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 14d2d2d75f
Update google_utils.py (#2900) 2021-04-22 20:27:32 +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
r-blmnr 0395e39fd0
Uppercase model filenames enabled (#2890) 2021-04-22 16:51:21 +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
Michael Heilig d48a34dca7
bug fix: switched rows and cols for correct detections in confusion matrix (#2883) 2021-04-22 00:49:55 +02:00
JoshSong 5f7d39fede
Cleanup load_image() (#2871)
* don't resize up in load_image if augmenting

* cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-21 15:50:28 +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
Burhan c949fc86d1
Detection cropping+saving feature addition for detect.py and PyTorch Hub (#2827)
* Update detect.py

* Update detect.py

* Update greetings.yml

* Update cropping

* cleanup

* Update increment_path()

* Update common.py

* Update detect.py

* Update detect.py

* Update detect.py

* Update common.py

* cleanup

* Update detect.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-20 23:51:08 +02:00
Glenn Jocher c5c647e281
Update increment_path() to handle file paths (#2867) 2021-04-20 19:47:07 +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
Robin 1479737064
Flask REST API Example (#2732)
* add files

* Update README.md

* Update README.md

* Update restapi.py

pretrained=True and model.eval() are used by default when loading a model now, so no need to call them manually.

* PEP8 reformat

* PEP8 reformat

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-15 13:26:08 +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
Ben Milanko e2b7bc0b32
YouTube Livestream Detection (#2752)
* Youtube livestream detection

* dependancy update to auto install pafy

* Remove print

* include youtube_dl in deps

* PEP8 reformat

* youtube url check fix

* reduce lines

* add comment

* update check_requirements

* stream framerate fix

* Update README.md

* cleanup

* PEP8

* remove cap.retrieve() failure code

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-04-11 18:53:40 +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 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
Ayush Chaurasia 3067429307
Add support for list-of-directory data format for wandb (#2719) 2021-04-06 16:57:13 +02:00
Ayush Chaurasia 514ebcdf33
Fix: #2674 (#2683)
* Set resume flag to false

* Check existance of val dataset
2021-04-02 11:54:50 +02:00
Ayush Chaurasia 2a28ef374b
Set resume flag to false (#2657) 2021-03-31 13:47:54 +02:00
Phat Tran 9c803f2f7e
Add --label-smoothing eps argument to train.py (default 0.0) (#2344)
* Add label smoothing option

* Correct data type

* add_log

* Remove log

* Add log

* Update loss.py

remove comment (too versbose)

Co-authored-by: phattran <phat.tranhoang@cyberlogitec.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-03-29 18:45:46 +02:00
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
2021-03-29 15:19:07 +02:00
zzttqu 1e8ab3f5f2
Add tqdm pbar.close() (#2644)
When using tqdm, sometimes it can't print in one line and roll to next line.
2021-03-29 12:21:25 +02:00
Glenn Jocher 2e95cf3d79
Improve git_describe() fix 1 (#2635)
Add stderr=subprocess.STDOUT to catch error messages.
2021-03-28 17:09:06 +02:00
Ayush Chaurasia 518c09578e
W&B resume ddp from run link fix (#2579)
* W&B resume ddp from run link fix

* Native DDP W&B support for training, resuming
2021-03-28 16:11:36 +02:00
Glenn Jocher 6e8c5b7678
Improve git_describe() (#2633)
Catch 'fatal: not a git repository' returns and return '' instead (observed in GCP Hub checks).
2021-03-28 15:39:31 +02:00
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
...
```
2021-03-26 12:52:47 +01:00
maxupp 196bf10603
Add '*.mpo' to supported image formats (#2615)
Co-authored-by: Max Uppenkamp <max.uppenkamp@inform-software.com>
2021-03-26 12:45:22 +01:00
Glenn Jocher 77415a42e5
Update git_describe() for remote dir usage (#2606) 2021-03-26 01:44:00 +01:00