Skip to content

Commit d06afe8

Browse files
committed
feat: v7
1 parent 8cceaef commit d06afe8

File tree

79 files changed

+354
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+354
-352
lines changed

mask_detection_labeling/about/about.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# About This Workshop
1+
# Introduction
22

33
Estimated Time: 5 minutes
44

5-
## Introduction
6-
75
I've always been curious about using Vision ML in some projects of mine. I dreamt of knowing how a Tesla autopilot worked on the inside, and whether I could make my own AI system at some point in my life. I was tired of dreaming, so I decided to learn by example (hands-on).
86

97
I set my focus on re-learning everything I knew about Vision ML (which is what I call image/video processing concerning Machine Learning in one way or another).
@@ -21,13 +19,13 @@ Today, we're going to create a *computer vision model*, which will detect differ
2119

2220
> **Note**: as you can see, the little girl on the second row, third column is wearing the mask with their nose showing, which is *incorrect*. We want our custom model to detect cases like these, which are also the hardest to represent, as there are a lot of pictures of people with and without masks, but there aren't as many of people wearing masks incorrectly on the Internet; which causes our dataset to be imbalanced.
2321
24-
## Final Result
22+
## Task 1: Final Result
2523

2624
This is a YouTube video illustrating what you will be able to achieve after completing this workshop.
2725

2826
[Watch the video](youtube:LPRrbPiZ2X8)
2927

30-
## Objectives
28+
## Task 2: Objectives
3129

3230
In this lab, you will complete the following steps:
3331

@@ -37,14 +35,14 @@ In this lab, you will complete the following steps:
3735

3836
✓ Preparing OCI compute instances for training Computer Vision Models
3937

40-
## OCI Elements
38+
## Task 3: OCI Elements
4139

4240
This solution is designed to work mainly with OCI Compute. We will use an OCI Compute Instance to save costs (compared to other Cloud providers) and training our Computer Vision model.
4341

4442
You can read more about the services used in the lab here:
4543
- [OCI Compute](https://www.oracle.com/cloud/compute/)
4644

47-
## Useful Resources
45+
## Task 4: Useful Resources
4846

4947
Here are three articles to get you from beginner to Computer Vision *hero*. This workshop is partly based on the content in these Medium articles.
5048

616 KB
Loading
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Lab 1: Understand YOLOv5
2+
3+
Estimated Time: 10 minutes
4+
5+
## Overview - What is YOLOv5?
6+
7+
In this lab, I want you to grasp how [YOLOv5](https://github.com/ultralytics/yolov5), a specific Transfer Learning Model, and a Computer Vision framework, can help us solve the problem of trying to detect correct / incorrect mask placement in images.
8+
9+
10+
YOLO (You Only Look Once) is a popular real-time object detection system developed by Joseph Redmon and Ali Farhadi. It's one of the latest versions of the YOLO system and was released in 2021.
11+
12+
Like other versions of YOLO, [YOLOv5](https://github.com/ultralytics/yolov5) is designed for fast, accurate, **real-time** object detection. It uses a _single_ convolutional neural network (CNN) to predict bounding boxes and class probabilities for objects in an image or video. The model is trained to predict the locations of objects in an input image and assign them to predefined categories, such as "car," "person," or "building."
13+
14+
In my personal experience -- and even though YOLOv5 isn't the newest detection system -- it's the one with the *lowest open issue to closed issue ratio*, which means that, for each open issue, more than 25 issues have already been closed.
15+
16+
![YOLOv5 example](./images/yolov5_example.jpg)
17+
18+
YOLOv5 improves upon previous versions by using more efficient network architectures and optimization techniques, resulting in faster and more accurate object detection. It also includes the ability to run on lower-power devices.
19+
20+
![YOLOv5 performance](./images/yolov5_performance.png)
21+
> **Note**: this is a figure detailing the performance and accuracy of YOLOv5 compared to EfficientDet, and the [different variations of YOLOv5](https://github.com/ultralytics/yolov5#why-yolov5) (these are different checkpoints).
22+
23+
YOLOv5 has been widely adopted and is used in a variety of applications, including self-driving cars, robotics, and security systems, which is why I decided to start with this detection system rather than any others.
24+
25+
And you may ask yourself: "why YOLOv5 and not others?" Well, I compared YOLOv5 to YOLOv7, which was developed during this year (2022) and is more recent than YOLOv5. However, it currently has an open/closed issue ratio of [3.59](https://github.com/WongKinYiu/yolov7/issues), *87 times higher than YOLOv5*!. Therefore, I recommend YOLOv5 for getting started, as it's complete and the open-source community is more on top of this project.
26+
> **Note**: YOLOv8 was released very recently and I'm personally planning on making the switch between YOLOv5 and YOLOv8 in the upcoming months. Code is very similar, at least from the programmer's perspective, so making the change is something you can even do in this project if you're interested.
27+
28+
## Task 1: Why Custom Models?
29+
30+
Custom-detection machine learning (ML) models can provide numerous benefits in various applications.
31+
32+
- One major benefit is **increased accuracy and performance** when we compare these models to **general** models. Custom detection models are tailored specifically to the task and data at hand, allowing them to learn and adapt to the specific characteristics and patterns in the data. This can lead to higher accuracy and better performance than the previously-mentioned general models, which are not as tailored to the task.
33+
- Also, a custom detection model will require a smaller number of resources to **train** it, as well as when making predictions with the model once it's been trained.
34+
- Finally, there isn't a general-purpose model that's previously been trained to detect mask placement, so we have no other choice than to go with the custom model.
35+
36+
Here's an example of the final result of this workshop being run against my web camera feed. Since there are no pre-trained models that predict correct mask placement, achieving this isn't possible if we don't create a **custom model**:
37+
38+
![A GIF of myself.](./images/myself.gif)
39+
So, now that we understand the **need** to create a custom YOLOv5 model, let's get straight into it.
40+
41+
You may now [proceed to the next lab](#next).
42+
43+
44+
## Acknowledgements
45+
46+
* **Author** - Nacho Martinez, Data Science Advocate @ Oracle DevRel
47+
* **Last Updated By/Date** - February 28th, 2023
17.8 MB
Loading
187 KB
Loading
231 KB
Loading
835 KB
Loading
32.5 KB
Loading
23.4 KB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)