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
3 years ago
Glenn Jocher
c8c8da6079
Update README with collapsable notes ( #2721 )
* Update README with collapsable notes.
* cleanup
* center table
3 years ago
Ayush Chaurasia
3067429307
Add support for list-of-directory data format for wandb ( #2719 )
3 years ago
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
3 years ago
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
3 years ago
Glenn Jocher
9ccfa85249
pip install coremltools onnx ( #2690 )
Requested in https://github.com/ultralytics/yolov5/issues/2686
3 years ago
Glenn Jocher
17300a4c7b
autoShape forward im = np.asarray(im) # to numpy ( #2689 )
Slight speedup.
3 years ago
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
3 years ago
Ayush Chaurasia
514ebcdf33
Fix : #2674 ( #2683 )
* Set resume flag to false
* Check existance of val dataset
3 years ago
Ding Yiwei
1148e2ea63
Add TransformerLayer, TransformerBlock, C3TR modules ( #2333 )
* yolotr
* transformer block
* Remove bias in Transformer
* Remove C3T
* Remove a deprecated class
* put the 2nd LayerNorm into the 2nd residual block
* move example model to models/hub, rename to -transformer
* Add module comments and TODOs
* Remove LN in Transformer
* Add comments for Transformer
* Solve the problem of MA with DDP
* cleanup
* cleanup find_unused_parameters
* PEP8 reformat
Co-authored-by: DingYiwei <846414640@qq.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
b8b862993d
Update README with Tips for Best Results tutorial ( #2682 )
* Update README with Tips for Best Results tutorial
* Update README.md
3 years ago
Glenn Jocher
877b826e3a
Created using Colaboratory
3 years ago
Glenn Jocher
51cc0962b5
Update README.md
3 years ago
Ayush Chaurasia
2a28ef374b
Set resume flag to false ( #2657 )
3 years ago
Glenn Jocher
1b475c1797
Created using Colaboratory
3 years ago
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>
3 years ago
Benjamin Fineran
fd1679975b
add option to disable half precision in test.py ( #2507 )
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Youngjin Shin
7cdc5165a1
Update requirements.txt ( #2564 )
* Add opencv-contrib-python to requirements.txt
* Update requirements.txt
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
1b100cd53e
Created using Colaboratory ( #2649 )
3 years ago
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
3 years ago
zzttqu
1e8ab3f5f2
Add tqdm pbar.close() ( #2644 )
When using tqdm, sometimes it can't print in one line and roll to next line.
3 years ago
Glenn Jocher
2bf34f50fd
PyTorch Hub amp.autocast() inference ( #2641 )
I think this should help speed up CUDA inference, as currently models may be running in FP32 inference mode on CUDA devices unnecesarily.
3 years ago
Glenn Jocher
ee169834bd
PyTorch Hub custom model to CUDA device fix ( #2636 )
Fix for #2630 raised by @Pro100rus32
3 years ago
Glenn Jocher
2e95cf3d79
Improve git_describe() fix 1 ( #2635 )
Add stderr=subprocess.STDOUT to catch error messages.
3 years ago
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
3 years ago
Ayush Chaurasia
dc51e80b00
Fix: evolve with wandb ( #2634 )
3 years ago
Glenn Jocher
6e8c5b7678
Improve git_describe() ( #2633 )
Catch 'fatal: not a git repository' returns and return '' instead (observed in GCP Hub checks).
3 years ago
Glenn Jocher
9b92d3ee76
FROM nvcr.io/nvidia/pytorch:21.03-py3 ( #2623 )
Update Docker FROM nvcr.io/nvidia/pytorch:21.03-py3
3 years ago
Glenn Jocher
2dfe32030a
Remove conflicting nvidia-tensorboard package ( #2622 )
Attempt to resolve tensorboard Docker error in https://github.com/ultralytics/yolov5/issues/2573
3 years ago
Glenn Jocher
005d7a8c54
Update Detections() self.n comment ( #2620 )
```python
self.n = len(self.pred) # number of images (batch size)
```
3 years ago
Ayush Chaurasia
8f6e447729
Fix Indentation in test.py ( #2614 )
* Fix Indentation in test.py
* CI fix
* Comply with PEP8: 80 characters per line
3 years ago
Glenn Jocher
a57f23d18b
Update detections() self.t = tuple() ( #2617 )
* Update detections() self.t = tuple()
Fix multiple results.print() bug.
* Update experimental.py
* Update yolo.py
3 years ago
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
...
```
3 years ago
maxupp
196bf10603
Add '*.mpo' to supported image formats ( #2615 )
Co-authored-by: Max Uppenkamp <max.uppenkamp@inform-software.com>
3 years ago
Glenn Jocher
77415a42e5
Update git_describe() for remote dir usage ( #2606 )
3 years ago
Glenn Jocher
fca16dc4b3
Remove Cython from requirements.txt ( #2604 )
Cython should be a dependency of the remaining packages in requirements.txt, so should be installed anyway even if not a direct requirement.
3 years ago
Glenn Jocher
3bb414890a
resume.py typo ( #2603 )
3 years ago
Glenn Jocher
d4456e43b2
Update segment2box() comment ( #2600 )
3 years ago
Glenn Jocher
ad05e37d99
Save webcam results, add --nosave option ( #2598 )
This updates the default detect.py behavior to automatically save all inference images/videos/webcams unless the new argument --nosave is used (python detect.py --nosave) or unless a list of streaming sources is passed (python detect.py --source streams.txt)
3 years ago
Max Kolomeychenko
16206692f2
Supervisely Ecosystem ( #2519 )
guide describes YOLOv5 apps collection in Supervisely Ecosystem
3 years ago
Glenn Jocher
333ccc5b0f
YOLOv5 PyTorch Hub models >> check_requirements() ( #2592 )
Improved user-feedback following requirements auto-update.
3 years ago
Glenn Jocher
75feeb797c
YOLOv5 PyTorch Hub models >> check_requirements() ( #2591 )
Prints 'Please restart runtime or rerun command for update to take effect.' following package auto-install to inform users to restart/rerun.
3 years ago
Glenn Jocher
8ace1b1b99
YOLOv5 PyTorch Hub models >> check_requirements() ( #2588 )
* YOLOv5 PyTorch Hub models >> check_requirements()
Update YOLOv5 PyTorch Hub requirements.txt path to cache path.
* Update hubconf.py
3 years ago
Glenn Jocher
9f98201dd9
W&B DDP fix 2 ( #2587 )
Revert unintentional change to test batch sizes caused by PR https://github.com/ultralytics/yolov5/pull/2125
3 years ago
Glenn Jocher
2bcc89d762
YOLOv5 PyTorch Hub models >> check_requirements() ( #2577 )
* Update hubconf.py with check_requirements()
Dependency checks have been missing from YOLOv5 PyTorch Hub model loading, causing errors in some cases when users are attempting to import hub models in unsupported environments. This should examine the YOLOv5 requirements.txt file and pip install any missing or version-conflict packages encountered.
This is highly experimental (!), please let us know if this creates problems in your custom workflows.
* Update hubconf.py
3 years ago
Glenn Jocher
e5b0200cd2
Update tensorboard>=2.4.1 ( #2576 )
* Update tensorboard>=2.4.1
Update tensorboard version to attempt to address https://github.com/ultralytics/yolov5/issues/2573 (tensorboard logging fail in Docker image).
* cleanup
3 years ago
Glenn Jocher
2b329b0945
Enhanced check_requirements() with auto-install ( #2575 )
* Update check_requirements() with auto-install
This PR builds on an idea I had to automatically install missing dependencies rather than simply report an error message.
YOLOv5 should now 1) display all dependency issues and not simply display the first missing dependency, and 2) attempt to install/update each missing/VersionConflict package.
* cleanup
* cleanup 2
* Check requirements.txt file exists
* cleanup 3
3 years ago
Ayush Chaurasia
1bf9365280
W&B DDP fix ( #2574 )
3 years ago
Glenn Jocher
0d891c601e
check_requirements() exclude pycocotools, thop ( #2571 )
Exclude non-critical packages from dependency checks in detect.py. pycocotools and thop in particular are not required for inference.
Issue first raised in https://github.com/ultralytics/yolov5/issues/1944 and also raised in https://github.com/ultralytics/yolov5/discussions/2556
3 years ago
Glenn Jocher
1c132a1f94
Update Detections() times=None ( #2570 )
Fix for results.tolist() method breaking after YOLOv5 Hub profiling PRshttps://github.com/ultralytics/yolov5/pull/2460 https://github.com/ultralytics/yolov5/pull/2459 and
3 years ago