Glenn Jocher: Image Augmentation in YOLO v5 and Beyond

Roboflow · Beginner ·👁️ Computer Vision ·5y ago

Key Takeaways

Glenn Jocher discusses image augmentation in YOLO v5, including techniques such as rotation, shear, gain scaling, and color space scaling, as well as the use of a mosaic data loader, and how these augmentations improve model performance.

Full Transcript

[Music] i'd love if you could touch a bit upon the augmentations that you're taking advantage of and how those are improving model performance i started off essentially trying to throw everything at the augmentation pipeline i had rotations i had shear i had gain scaling and then of course color space scaling so we had hsb scaling different ratios and lastly i use this mosaic data loader which would take four images randomly place them and then apply all these augmentations at the same time so augmentation is a tricky thing i actually discovered that some of the augmentations that i'd applied even in small amounts were hurting the results on the coco dataset and a lot of the time you don't get the satisfaction of really understanding why you get a certain result in ml so it takes a lot of experimenting a lot of trial and error so i've actually toned back the augmentation techniques now and in the latest repository in yolo v5 we have a high degree of scaling augmentation and we use a mosaic data loader and we do color space augmentation so the augmentations are done a little bit differently in v5 than in the v3 repo that i had and v3 literally upscale the entire image and pass that in as a batch during training so one of the downsides of this is that it uses up a lot of memory if you want to scale up your images very large so in v5 rather than scaling the actual image we keep the image the same size so for example the default training size is 640 pixels so we input 640 images for every single batch and the augmentation the scaling is done within a feed transform that'll increase the size of the image or decrease it but it always crops it at the same 640. um it'll randomly translate it also i forgot that but this is actually it's a bit of an improvement because it means that every image in the batch can be scaled differently from every other image in the batch which increases variation and it also means that you don't need extra memory to train very large images so when you do the very large image you're leaving some training performance on the table when you do smaller images so if you have a batch that decides to fit into memory that's this big and then one of your batches is smaller like this you have a whole lot of gpu memory that's not being used for that smaller batch so this exploits the gpu memory much better one interesting nugget in that is it sounds like you ran a seater's experiments to identify which augmentations would generalize effectively to any domain what work do you think is left to be done in ml in augmentation optimization strategies because we see in our own tests that augmentation is dependent upon the domain so it's really tough to like always use this checklist of augmentations right mosaic generally increases performance i don't know that we find a founding place where it decreases performance if you're building mobile apps rotation sometimes is really useful because the orientation of the phone to the device to the object is going to be quite varied i'm curious to hear if augmentation is something that you believe might be contextual to the problem but you're including it in the training pipeline how do you think the augmentation portion of training will evolve well this is an excellent question and i don't think that there's any easy answers like you said there's some domains like satellite imagery where rotation is incredibly important uh and then there's others for example like a lot of the cocoa dataset for example where like a lot of the images are the way you usually take them with a cell phone and they're just not rotated that much in the short term the medium term and probably the long term i think there's always going to have to be a human hand guiding the augmentation strategy at least a certain extent of course there's fully automated methods like auto augments yeah which efficient debt also uses for some of their large models but again this is the bridge too far for i think most organizations to spend the money in the gpu time these are the two answers essentially there's a brute force method if you can manage it then more power to you but if you can't then uh i don't know there's there's not quite any easy answers today other than relying on your own experience and the experience of those around you yeah that makes a lot of sense [Music]

Original Description

Subscribe for future exclusive interview content: https://bit.ly/rf-yt-sub Glenn Jocher, the creator of YOLOv5, discusses how he approached adding augmentations to the YOLO v5 training pipeline. He also discusses why he believes human input will be a key component in the future of augmentation. Learn how to train YOLOv5: https://blog.roboflow.com/how-to-train-yolov5-on-a-custom-dataset/ Improve your computer vision models: https://roboflow.com
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Roboflow · Roboflow · 30 of 60

1 YOLOv3 PyTorch Notebook Tutorial
YOLOv3 PyTorch Notebook Tutorial
Roboflow
2 How to Train YOLOv4 on a Custom Dataset (PyTorch)
How to Train YOLOv4 on a Custom Dataset (PyTorch)
Roboflow
3 How to Train YOLOv5 on a Custom Dataset
How to Train YOLOv5 on a Custom Dataset
Roboflow
4 How to Use the Roboflow Dataset Health Check
How to Use the Roboflow Dataset Health Check
Roboflow
5 What is Mean Average Precision (mAP)?
What is Mean Average Precision (mAP)?
Roboflow
6 How to Use the Roboflow Model Library
How to Use the Roboflow Model Library
Roboflow
7 How to Train EfficientDet in TensorFlow 2 Object Detection
How to Train EfficientDet in TensorFlow 2 Object Detection
Roboflow
8 How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
Roboflow
9 Ask the Roboflow Team Anything - Episode 1
Ask the Roboflow Team Anything - Episode 1
Roboflow
10 Exploring The COCO Dataset
Exploring The COCO Dataset
Roboflow
11 Community Spotlight: Improving Uno with Computer Vision
Community Spotlight: Improving Uno with Computer Vision
Roboflow
12 Mosaic Data Augmentation - Deep Dive
Mosaic Data Augmentation - Deep Dive
Roboflow
13 Hands on with the OAK-1
Hands on with the OAK-1
Roboflow
14 Glenn Jocher: What is New in YOLO v5?
Glenn Jocher: What is New in YOLO v5?
Roboflow
15 How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
Roboflow
16 An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
Roboflow
17 How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
Roboflow
18 Tackling the Small Object Problem in Object Detection
Tackling the Small Object Problem in Object Detection
Roboflow
19 Fast.ai v2 Released - What's New?
Fast.ai v2 Released - What's New?
Roboflow
20 Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Roboflow
21 How to Train a Custom Resnet34 Image Classification Model
How to Train a Custom Resnet34 Image Classification Model
Roboflow
22 How to Label Images for Object Detection with CVAT
How to Label Images for Object Detection with CVAT
Roboflow
23 Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Roboflow
24 Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Roboflow
25 Getting Started with VoTT - Computer Vision Annotation
Getting Started with VoTT - Computer Vision Annotation
Roboflow
26 How to Manage Classes in Object Detection (Rename, Combine, Balance)
How to Manage Classes in Object Detection (Rename, Combine, Balance)
Roboflow
27 How to Train YOLOv4 on a Custom Dataset in Darknet
How to Train YOLOv4 on a Custom Dataset in Darknet
Roboflow
28 Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Roboflow
29 Getting Started with Image Data Augmentation
Getting Started with Image Data Augmentation
Roboflow
Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Roboflow
31 GA Hosts Roboflow - Healthcare and AI
GA Hosts Roboflow - Healthcare and AI
Roboflow
32 How do self driving cars know when to stop?
How do self driving cars know when to stop?
Roboflow
33 What is PASCAL VOC XML?
What is PASCAL VOC XML?
Roboflow
34 AutoML Showdown: Google vs Amazon vs Microsoft
AutoML Showdown: Google vs Amazon vs Microsoft
Roboflow
35 How is computer vision changing manufacturing?
How is computer vision changing manufacturing?
Roboflow
36 The Alphabet in American Sign Language
The Alphabet in American Sign Language
Roboflow
37 Luxonis OAK-D: Computer Vision on Device
Luxonis OAK-D: Computer Vision on Device
Roboflow
38 How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
Roboflow
39 TensorFlow vs PyTorch: Fireside
TensorFlow vs PyTorch: Fireside
Roboflow
40 Occlusion Techniques in Computer Vision
Occlusion Techniques in Computer Vision
Roboflow
41 A Customizable Web Application for Your Computer Vision Model
A Customizable Web Application for Your Computer Vision Model
Roboflow
42 Model Tradeoffs and the Future of Computer Vision
Model Tradeoffs and the Future of Computer Vision
Roboflow
43 Designing an Augmented Reality Board Game App
Designing an Augmented Reality Board Game App
Roboflow
44 YOLOv4 - Advanced Tactics
YOLOv4 - Advanced Tactics
Roboflow
45 How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
Roboflow
46 Fireside Chat: Computer Vision in Agriculture
Fireside Chat: Computer Vision in Agriculture
Roboflow
47 Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Roboflow
48 What is Image Preprocessing?
What is Image Preprocessing?
Roboflow
49 Building a Community of Creators with BlkArthouse and Von Deon
Building a Community of Creators with BlkArthouse and Von Deon
Roboflow
50 How to Train Scaled-YOLOv4 to Detect Custom Objects
How to Train Scaled-YOLOv4 to Detect Custom Objects
Roboflow
51 Intro to Computer Vision: Fireside
Intro to Computer Vision: Fireside
Roboflow
52 The Best Way to Annotate Images for Object Detection
The Best Way to Annotate Images for Object Detection
Roboflow
53 The Computer Vision Process: Fireside
The Computer Vision Process: Fireside
Roboflow
54 How to Annotate Images with Your Team Using Roboflow
How to Annotate Images with Your Team Using Roboflow
Roboflow
55 Introducing the Roboflow Object Count Histogram
Introducing the Roboflow Object Count Histogram
Roboflow
56 How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
Roboflow
57 CLIP: OpenAI's amazing new zero-shot image classifier
CLIP: OpenAI's amazing new zero-shot image classifier
Roboflow
58 How I hacked my Nest camera to run custom models
How I hacked my Nest camera to run custom models
Roboflow
59 Getting Started with the Roboflow Inference API
Getting Started with the Roboflow Inference API
Roboflow
60 Transfer Learning in Computer Vision | What, How, Why
Transfer Learning in Computer Vision | What, How, Why
Roboflow

Glenn Jocher discusses image augmentation in YOLO v5 and how it improves model performance. He covers various techniques, including rotation, shear, and color space scaling, and the use of a mosaic data loader.

Key Takeaways
  1. Implement rotation augmentation
  2. Apply shear augmentation
  3. Use gain scaling and color space scaling
  4. Utilize a mosaic data loader
  5. Experiment with different augmentation techniques to find the best approach for your specific use case
💡 Image augmentation is a crucial step in improving model performance, but it requires careful experimentation and tuning to find the most effective techniques for a given use case.

Related Reads

📰
Automatically redact PII in images with Amazon Nova
Automatically redact PII in images using Amazon Nova and complementary tools like SAM 3 and Amazon Textract
AWS Machine Learning
📰
PANet Paper Walkthrough: When Feature Pyramids Go Bottom-Up
Learn how PANet's bottom-up feature pyramid approach improves feature extraction by shortening the path between low-level and high-level features
Towards Data Science
📰
CCTV Action Recognition: Comprehensive Fine-Tuning & Real-Time Deployment Guide
Learn to fine-tune and deploy a hybrid Deep Learning model for CCTV action recognition using MobileNetV2 and Python
Medium · Python
📰
I built a background remover that keeps the fine hair edges
Learn how to build a background remover that preserves fine hair edges, a challenging task in image processing
Dev.to · KunStudio
Up next
Marketing management for ugc net| Important topics of marketing management ugc net commerce dec 2023
Bhoomi Learning Centre~Dr. Muskan
Watch →