ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.88k stars 16.38k forks source link

More Augmentations #3699

Closed jaideep11061982 closed 3 years ago

jaideep11061982 commented 3 years ago

❔Question

How i can use more and more augmentations related to Image Enhancements.

Additional context

github-actions[bot] commented 3 years ago

👋 Hello @jaideep11061982, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

glenn-jocher commented 3 years ago

@jaideep11061982 what augmentations are you interested in?

tetelevm commented 3 years ago

@glenn-jocher I am also interested in this question. As I understand it, YOLO slices images for training, but does it also know how to rotate images by (90, 180, 270) degrees? (And is it even worth doing that?)

glenn-jocher commented 3 years ago

@tetelevm hyperparameters for augmentation including rotation are defined in the hyp file: https://github.com/ultralytics/yolov5/blob/fbf41e09134b113f8e79ae01b4eee40d00797b2d/data/hyp.scratch.yaml#L22-L33

decent-engineer-decent-datascientist commented 3 years ago

@glenn-jocher have you checked this out: https://github.com/facebookresearch/AugLy

I'd never need this for my use cases, but you can do stuff like add ig filters, emojis, simulate screenshots, etc. A lot of modern digital-life augmentations that might not win you any AP on COCO, but would be useful for real-world applications.

Here's a list of augmentations: https://github.com/facebookresearch/AugLy/blob/main/augly/image/__init__.py

glenn-jocher commented 3 years ago

@decent-engineer-decent-datascientist yes I've seen the facebook augmentation package, which seems to be the flavor of the week, but I would recommend Albumentations: https://github.com/albumentations-team/albumentations

You could integrate additional Albumentations augmentations in the YOLOv5 dataloader here: https://github.com/ultralytics/yolov5/blob/e8810a53e83ddb5dd6bf8e871c2ede701007047c/utils/datasets.py#L536-L552