Recent Releases of musong
musong - v7.0.14
What's Changed
- Add support to huggingface hub download with revision version by @muhammadariffaizin in https://github.com/fcakyon/yolov5-pip/pull/255
- Limit max version of hugginface_hub to fix import error by @jc-roman in https://github.com/fcakyon/yolov5-pip/pull/260
New Contributors
- @muhammadariffaizin made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/255
- @jc-roman made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/260
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.13...7.0.14
- Python
Published by fcakyon over 1 year ago
musong - v7.0.13
What's Changed
- Minor changes for compatibility with neptune 1.0 by @hasanemirakin in https://github.com/fcakyon/yolov5-pip/pull/241
- Fixed bug in precision logic by @SIR-unit in https://github.com/fcakyon/yolov5-pip/pull/232
- Update general.py (fix module not found error) by @Petros626 in https://github.com/fcakyon/yolov5-pip/pull/246
- fix module not found by @1qh in https://github.com/fcakyon/yolov5-pip/pull/247
- fix roboflow ci by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/248
- update version by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/249
- fix pypi publish action by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/251
New Contributors
- @hasanemirakin made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/241
- @SIR-unit made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/232
- @Petros626 made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/246
- @1qh made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/247
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.12...7.0.13
- Python
Published by fcakyon over 2 years ago
musong - v7.0.12
What's Changed
- update to 15.05.23 ultralytics/yolov5 by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/235
- update version by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/236
- update reference yolov5 commit by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/237
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.11...7.0.12
- Python
Published by fcakyon almost 3 years ago
musong - v7.0.10
What's Changed
- refactor convertcocodatasettoyolo by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/221
- update version by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/226
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.9...7.0.10
- Python
Published by fcakyon almost 3 years ago
musong - v7.0.9
What's Changed
- fix coco to yolo conversion in colab by @kadirnar in https://github.com/fcakyon/yolov5-pip/pull/219
- update version by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/220
- fix classify datasets dir by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/222
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.8...7.0.9
- Python
Published by fcakyon about 3 years ago
musong - v7.0.8
Roboflow Integration
- Train your model using Roboflow Universe datasets (roboflow>=0.2.27 required):
bash
$ yolov5 train --data DATASET_UNIVERSE_URL --weights yolov5s.pt --roboflow_token YOUR_ROBOFLOW_TOKEN
Where DATASET_UNIVERSE_URL must be in https://universe.roboflow.com/workspace_name/project_name/project_version format.
What's Changed
- Supports directly calling the scripts without installing the package by @ngxingyu in https://github.com/fcakyon/yolov5-pip/pull/208
- Using Roboflow Universe datasets for training detection, segmentation and classification by @SkalskiP in https://github.com/fcakyon/yolov5-pip/pull/210
- update to 01.02.23 ultralytics/yolov5 by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/214
New Contributors
- @ngxingyu made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/208
- @SkalskiP made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/210
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.7...7.0.8
- Python
Published by fcakyon about 3 years ago
musong - v7.0.6
What's Changed
- minor update by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/194
- update card by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/195
- update pip caching in ci by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/196
- update readme by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/198
- fix deprecation warning by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/199
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.5...7.0.6
- Python
Published by fcakyon about 3 years ago
musong - v7.0.5
What's Changed
- improve hf modelcard generation by @keremberke in https://github.com/fcakyon/yolov5-pip/pull/190
- when workers==0, dont create new multiprocess pools by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/191
- update hf push by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/192
New Contributors
- @keremberke made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/190
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.4...7.0.5
- Python
Published by fcakyon about 3 years ago
musong - v7.0.3
🤗 HuggingFace Hub Integration
- Use yolov5 models from hub:
```python import yolov5
load model
model = yolov5.load('fcakyon/yolov5s-v7.0')
set image
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
perform inference
results = model(img, size=640)
show detection bounding boxes on image
results.show() ```
- Fine-tune yolov5 models from hub:
bash
yolov5 train --img 640 --batch 16 --weights fcakyon/yolov5s-v7.0 --epochs 10 --device cuda:0
- Automatically push fine-tuned weight and training logs to hub (with autogenerated model card):
bash
yolov5 train --data data.yaml --weights yolov5s.pt --hf_model_id username/modelname --hf_token YOUR-HF-WRITE-TOKEN
Available models: https://huggingface.co/models?other=yolov5
What's Changed
- ad hf hub tests to package testing by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/177
- fix private hub model download by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/179
- add automatic hf hub upload, refactor helpers by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/180
- fix readme by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/181
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.2...7.0.3
- Python
Published by fcakyon about 3 years ago
musong - v7.0.0
What's Changed
- better exception handling for hublike loading by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/167
- update to ultralytics/yolov5 13.12.22 by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/170
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.3...7.0.0
- Python
Published by fcakyon about 3 years ago
musong - v6.2.2
What's Changed
- update workflow versions by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/156
- fix a bug in train resume by @QazyBi in https://github.com/fcakyon/yolov5-pip/pull/161
New Contributors
- @QazyBi made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/161
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.1...6.2.2
- Python
Published by fcakyon over 3 years ago
musong - v6.2.1
What's Changed
- fix package_testing by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/148
- Fixed Invalid CUDA error. by @kadirnar in https://github.com/fcakyon/yolov5-pip/pull/149
- revert dataset path resolve by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/151
- fix segment dataloading error by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/153
- update version by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/155
New Contributors
- @kadirnar made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/149
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.0...6.2.1
- Python
Published by fcakyon over 3 years ago
musong - v6.2.0
New Features
Classify
Train/Val/Predict with YOLOv5 image classifier:
bash
$ yolov5 classify train --img 640 --data mnist2560 --weights yolov5s-cls.pt --epochs 1
bash
$ yolov5 classify predict --img 640 --weights yolov5s-cls.pt --source images/
```python from yolov5.classify import train, val, predict
train.run(imgsz=640, data='mnist2560.yaml') val.run(imgsz=640, weights='yolov5s-cls.pt') predict.run(imgsz=640) ```
```python import yolov5
model = yolov5.load('yolov5s-cls.pt') ```
Segment
Train/Val/Predict with YOLOv5 instance segmentation model:
bash
$ yolov5 segment train --img 640 --weights yolov5s-seg.pt --epochs 1
bash
$ yolov5 segment predict --img 640 --weights yolov5s-seg.pt --source images/
```python from yolov5.segment import train, val, predict
train.run(imgsz=640, data='coco128.yaml') val.run(imgsz=640, weights='yolov5s-seg.pt') predict.run(imgsz=640) ```
```python import yolov5
model = yolov5.load('yolov5s-seg.pt') ```
What's Changed
- Fix pypi package version not updating in readme by @Isydmr in https://github.com/fcakyon/yolov5-pip/pull/141
- fix typo notebook utils by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/144
- update export arg usage by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/145
- update to ultralytics 16.09.22 by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/146
- add classify and segment usage into readme by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/147
New Contributors
- @Isydmr made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/141
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.9...6.2.0
- Python
Published by fcakyon over 3 years ago
musong - v6.1.4
What's Changed
- fix category based ap logging by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/122
- remove redundant code block by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/118
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.3...6.1.4
- Python
Published by fcakyon over 3 years ago
musong - v6.1.3
What's Changed
- update tests for augment argument by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/112
- fix protobuf incompatibility with tensorboard by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/115
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.2...6.1.3
- Python
Published by fcakyon over 3 years ago
musong - v6.1.1
What's Changed
- update multibackend model load by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/104
- fix: disable usage of root logger by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/105
- improve image size arg by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/107
- fix tensorrt inference by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/108
- update pretrained model release tag by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/109
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.0...6.1.1
- Python
Published by fcakyon almost 4 years ago
musong - v6.1.0
This yolov5 package contains everything from ultralytics/yolov5 at this commit plus:
1. Easy installation via pip: pip install yolov5
2. Full CLI integration with Fire package
3. NeptuneAI logger support (metric, model and dataset logging)
4. S3 support (model and dataset upload)
5. Classwise AP logging during experiment
6. COCO dataset format support (for training)
What's Changed
- update to ultralytics/yolov5 04.04.22 by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/90
- delete duplicate data config by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/91
- update test for latest model weights by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/92
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.0.7...6.1.0
- Python
Published by fcakyon almost 4 years ago
musong - v6.0.7
What's Changed
- add torch>=1.10.0 meshgrid workaround for torch>=0.7 compatibility by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/74
- update to v6.0.7 by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/75
- fix check_version by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/76
- Update README.md by @5a7man in https://github.com/fcakyon/yolov5-pip/pull/82
New Contributors
- @5a7man made their first contribution in https://github.com/fcakyon/yolov5-pip/pull/82
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.0.6...6.0.7
- Python
Published by fcakyon almost 4 years ago
musong - v6.0.6
What's Changed
- fix neptune logging by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/69
- reformat codebase with isort by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/71
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.0.5...6.0.6
- Python
Published by fcakyon about 4 years ago
musong - v6.0.5
What's Changed
- coco dataset support, automatic aws weight upload by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/54
- add dataset upload, add neptune dataset tracking by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/59
- add windows support for dataset upload by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/61
- make pycocotools optional by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/56
- remove python 3.6 in tests by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/57
- add missing argument in readme by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/60
- fix omp error in windows by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/62
- fix weight s3 uri for windows by @fcakyon in https://github.com/fcakyon/yolov5-pip/pull/63
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.0.4...6.0.5
COCO Dataset Support
- Start a training using a COCO formatted dataset:
```yaml
data.yml
trainjsonpath: "train.json" trainimagedir: "trainimagedir/" valjsonpath: "val.json" valimagedir: "valimagedir/" ```
bash
$ yolov5 train --data data.yaml --weights yolov5s.pt
New AWS and Neptune.AI Utilities
- Automatically upload weights and datasets to AWS S3 (with Neptune.AI artifact tracking integration):
bash
export AWS_ACCESS_KEY_ID=YOUR_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_KEY
bash
$ yolov5 train --data data.yaml --weights yolov5s.pt --s3_upload_dir YOUR_S3_FOLDER_DIRECTORY --upload_dataset
- Add
yolo_s3_data_dirintodata.yamlto match Neptune dataset with a present dataset in S3.
```yaml
data.yml
trainjsonpath: "train.json" trainimagedir: "trainimagedir/" valjsonpath: "val.json" valimagedir: "valimagedir/" yolos3datadir: s3://bucketname/data_dir/ ```
- Python
Published by fcakyon about 4 years ago
musong - v6.0.1
Use from Python
Basic
```python import yolov5 # load model model = yolov5.load('yolov5s') # set image img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' # perform inference results = model(img) # inference with larger input size results = model(img, size=1280) # inference with test time augmentation results = model(img, augment=True) # parse results predictions = results.pred[0] boxes = predictions[:, :4] # x1, x2, y1, y2 scores = predictions[:, 4] categories = predictions[:, 5] # show detection bounding boxes on image results.show() # save results into "results/" folder results.save(save_dir='results/') ```Alternative
```python from yolov5 import YOLOv5 # set model params model_path = "yolov5/weights/yolov5s.pt" device = "cuda:0" # or "cpu" # init yolov5 model yolov5 = YOLOv5(model_path, device) # load images image1 = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' image2 = 'https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg' # perform inference results = yolov5.predict(image1) # perform inference with larger input size results = yolov5.predict(image1, size=1280) # perform inference with test time augmentation results = yolov5.predict(image1, augment=True) # perform inference on multiple images results = yolov5.predict([image1, image2], size=1280, augment=True) # parse results predictions = results.pred[0] boxes = predictions[:, :4] # x1, x2, y1, y2 scores = predictions[:, 4] categories = predictions[:, 5] # show detection bounding boxes on image results.show() # save results into "results/" folder results.save(save_dir='results/') ```Train/Detect/Test/Export
- You can directly use these functions by importing them: ```python from yolov5 import train, val, detect, export train.run(imgsz=640, data='coco128.yaml') val.run(imgsz=640, data='coco128.yaml', weights='yolov5s.pt') detect.run(imgsz=640) export.run(imgsz=640, weights='yolov5s.pt') ``` - You can pass any argument as input: ```python from yolov5 import detect img_url = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' detect.run(source=img_url, weights="yolov5s6.pt", conf_thres=0.25, imgsz=640) ```Use from CLI
You can call yolov5 train, yolov5 detect, yolov5 val and yolov5 export commands after installing the package via pip:
Training
Finetune one of the pretrained YOLOv5 models using your custom `data.yaml`: ```bash $ yolov5 train --data data.yaml --weights yolov5s.pt --batch-size 16 --img 640 yolov5m.pt 8 yolov5l.pt 4 yolov5x.pt 2 ``` Visualize your experiments via [Neptune.AI](https://neptune.ai/): ```bash $ yolov5 train --data data.yaml --weights yolov5s.pt --neptune_project NAMESPACE/PROJECT_NAME --neptune_token YOUR_NEPTUNE_TOKEN ```Inference
yolov5 detect command runs inference on a variety of sources, downloading models automatically from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`. ```bash $ yolov5 detect --source 0 # webcam file.jpg # image file.mp4 # video path/ # directory path/*.jpg # glob rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa # rtsp stream rtmp://192.168.1.105/live/test # rtmp stream http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8 # http stream ```Export
You can export your fine-tuned YOLOv5 weights to any format such as `torchscript`, `onnx`, `coreml`, `pb`, `tflite`, `tfjs`: ```bash $ yolov5 export --weights yolov5s.pt --include 'torchscript,onnx,coreml,pb,tfjs' ```
- Python
Published by fcakyon over 4 years ago
musong - v5.0.8
update to 24.08.21 ultralytics/yolov5
cli api changes:
Use from CLI
You can call yolov5 train, yolov5 detect, yolov5 val and yolov5 export commands after installing the package via pip:
Run commands below to reproduce results on COCO dataset (dataset auto-downloads on first use). Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest --batch-size your GPU allows (batch sizes shown for 16 GB devices).
bash
$ yolov5 train --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64
yolov5m 40
yolov5l 24
yolov5x 16
yolov5 detect command runs inference on a variety of sources, downloading models automatically from the latest YOLOv5 release and saving results to runs/detect.
bash
$ yolov5 detect --img 1280 --source 0 # webcam
file.jpg # image
file.mp4 # video
path/ # directory
path/*.jpg # glob
rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa # rtsp stream
rtmp://192.168.1.105/live/test # rtmp stream
http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8 # http stream
To run inference on example images in yolov5/data/images:
- Python
Published by fcakyon over 4 years ago
musong - v5.0.6
Install
Install yolov5 using pip (for Python >=3.7)
```console pip install yolov5 ```Install yolov5 using pip `(for Python 3.6)`
```console pip install "numpy>=1.18.5,<1.20" "matplotlib>=3.2.2,<4" pip install yolov5 ```Use from Python
Basic
```python import yolov5 # load model model = yolov5.load('yolov5s') # set image img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' # perform inference results = model(img) # inference with larger input size results = model(img, size=1280) # inference with test time augmentation results = model(img, augment=True) # parse results predictions = results.pred[0] boxes = predictions[:, :4] # x1, x2, y1, y2 scores = predictions[:, 4] categories = predictions[:, 5] # show detection bounding boxes on image results.show() # save results into "results/" folder results.save(save_dir='results/') ```Alternative
```python from yolov5 import YOLOv5 # set model params model_path = "yolov5/weights/yolov5s.pt" # it automatically downloads yolov5s model to given path device = "cuda" # or "cpu" # init yolov5 model yolov5 = YOLOv5(model_path, device) # load images image1 = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' image2 = 'https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg' # perform inference results = yolov5.predict(image1) # perform inference with larger input size results = yolov5.predict(image1, size=1280) # perform inference with test time augmentation results = yolov5.predict(image1, augment=True) # perform inference on multiple images results = yolov5.predict([image1, image2], size=1280, augment=True) # parse results predictions = results.pred[0] boxes = predictions[:, :4] # x1, x2, y1, y2 scores = predictions[:, 4] categories = predictions[:, 5] # show detection bounding boxes on image results.show() # save results into "results/" folder results.save(save_dir='results/') ```Train/Detect/Test/Export
- You can directly use these functions by importing them: ```python from yolov5 import train, test, detect, export train.run(imgsz=640, data='coco128.yaml') test.run(imgsz=640, data='coco128.yaml', weights='yolov5s.pt') detect.run(imgsz=640) export.run(imgsz=640, weights='yolov5s.pt') ``` - You can pass any argument as input: ```python from yolov5 import detect img_url = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' detect.run(source=img_url, weights="yolov5s6.pt", conf_thres=0.25, imgsz=640) ```Use from CLI
You can call yolo_train, yolo_detect, yolo_test and yolo_export commands after installing the package via pip:
Training
Run commands below to reproduce results on [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) dataset (dataset auto-downloads on first use). Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest `--batch-size` your GPU allows (batch sizes shown for 16 GB devices). ```bash $ yolo_train --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64 yolov5m 40 yolov5l 24 yolov5x 16 ```Inference
yolo_detect command runs inference on a variety of sources, downloading models automatically from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`. ```bash $ yolo_detect --source 0 # webcam file.jpg # image file.mp4 # video path/ # directory path/*.jpg # glob rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa # rtsp stream rtmp://192.168.1.105/live/test # rtmp stream http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8 # http stream ``` To run inference on example images in `yolov5/data/images`:
- Python
Published by fcakyon over 4 years ago
musong - v5.0.5
- Synchronized with 11.05.21 ultralytics/yolov5 repo.
PLUS:
neptune ai support:
yolo_train --data coco.yaml --weights yolov5s.pt --neptune_token YOUR_TOKEN --neptune_project YOUR/PROJECTmmdet style metric logging support
yolo_train --data coco.yaml --weights yolov5s.pt --mmdet_tags
- Python
Published by fcakyon almost 5 years ago
musong - v5.0.3
- Update to ultralytics/yolov5 24.04.21
- Python
Published by fcakyon almost 5 years ago
musong - v5.0.0
Basic Usage
```python import yolov5
model
model = yolov5.load('yolov5s')
image
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
inference
results = model(img)
inference with larger input size
results = model(img, size=1280)
inference with test time augmentation
results = model(img, augment=True)
show results
results.show()
save results
results.save(save_dir='results/')
```
Scripts
You can call yolotrain, yolodetect and yolo_test commands after installing the package via pip:
Training
Run commands below to reproduce results on COCO dataset (dataset auto-downloads on first use). Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest --batch-size your GPU allows (batch sizes shown for 16 GB devices).
bash
$ yolo_train --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64
yolov5m 40
yolov5l 24
yolov5x 16
Inference
yolo_detect command runs inference on a variety of sources, downloading models automatically from the latest YOLOv5 release and saving results to runs/detect.
bash
$ yolo_detect --source 0 # webcam
file.jpg # image
file.mp4 # video
path/ # directory
path/*.jpg # glob
rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa # rtsp stream
rtmp://192.168.1.105/live/test # rtmp stream
http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8 # http stream
To run inference on example images in data/images:
bash
$ yolo_detect --source data/images --weights yolov5s.pt --conf 0.25
- Python
Published by fcakyon almost 5 years ago
musong - v4.0.4
- fully functional pip package version of ultralytics/yolov5 v4.0 release
- Python
Published by fcakyon about 5 years ago