Skip to content

How does object detection work? A thorough explanation of the amount of data required, use cases, and construction steps!

 

image (2)


Did you know that AI for object detection can be utilized not only for detecting objects such as obstacles but also for anomaly detection and marketing analysis? While the applications of object detection continue to expand, many people may be concerned about how to apply it to their own business and how much training data needs to be prepared.

In this article, we explain business use cases and the mechanisms of object detection. We also explain how to build an object detection AI system, so you can understand the flow of implementation. We also introduce points to consider for increasing detection speed, so please use this as a reference.

Additionally, in "What Is a Bounding Box? How Is It Used in YOLO? Comprehensive Explanation of Benefits, Drawbacks, and Object Detection Methods," we provide a detailed explanation of the benefits, drawbacks, and representation methods of bounding boxes, which are frequently used in object detection for image analysis. Reading it together will further deepen your understanding of this article.

 

Nextremer offers data annotation services to achieve highly accurate AI models. If you are considering outsourcing annotation, free consultation is available. Please feel free to contact us.

 

 

1. What Is Object Detection?

image-6


Object detection is an AI technology that detects target objects within an image. By having the system learn the appearance of the objects you want to detect, it becomes possible to recognize target objects automatically.

By utilizing object detection, you can not only detect target objects but also understand their positions and count them. Object detection is already being applied in business.

For example, in quality control within the manufacturing industry, it contributes to quality improvement by automatically detecting product anomalies. In the retail industry, it is used for analyzing product placement in stores and customer traffic flow to support optimal store operations. Furthermore, in transportation systems, it is attracting attention as an essential technology for achieving safe driving in autonomous vehicles.

 

① How AI Object Detection Works

image (3)


The mechanism of AI object detection is a process that uses image recognition technology to identify specific target objects and accurately specify their positions and attributes. An AI object detection system typically performs processing through the following two steps:

  1. Narrow down the locations where the target objects to be detected are likely to be.
  2. Compare them with previously learned data to judge what they are.

Increasing the number of initial screenings tends to improve accuracy as it reduces oversights, but the processing time becomes longer. To increase processing speed while maintaining accuracy, methods such as the following have been developed:

  • YOLO (You Only Look Once)
  • R-CNN (Regions with Convolutional Neural Networks)
  • Fast R-CNN
  • Faster R-CNN
  • SSD (Single Shot MultiBox Detector)
  • DCN (Deformable Convolutional Networks)
  • DETR (DEtection TRansformer)

Methods like YOLO and Faster R-CNN are particularly noteworthy.

YOLO achieves high-speed and high-precision object detection by looking at the image only once. On the other hand, Faster R-CNN uses a Region Proposal Network to quickly specify candidate regions, enabling high-precision detection.

Each method is explained in detail in "What is a bounding box? How is it used in YOLO? A thorough explanation of the advantages and disadvantages of object detection methods."


② Number of Data Required for Object Detection

The amount of training data required for object detection varies greatly depending on the target accuracy and the type of object. Generally, thousands to tens of thousands of data points are often required, but this is only a guideline and will fluctuate according to specific project requirements.

Furthermore, the required number of data points also changes depending on the quality of the training data. High-quality data enables high-precision object detection with a relatively small amount of data. This is because representative data that covers potential cases provides the information necessary for learning efficiently.

Low-quality data may require an enormous amount of data points. This is because the model cannot properly learn the necessary features due to inaccurate labeling or inappropriate data handling.

 

2. Object Detection Use Cases and Capabilities

image-5


By utilizing object detection, the following are possible:

  • Anomaly detection
  • Obstacle detection
  • Visual inspection
  • Marketing analysis
  • Traffic flow measurement


We will explain each of these.

 

・Anomaly Detection

Object detection can be utilized for anomaly detection for safety management.

For example, in factories and construction sites, the risk of accidents can be reduced by detecting when a person has entered a dangerous area and issuing a warning. Additionally, in public places and commercial facilities, it is possible to perceive security issues in advance by detecting abandoned luggage or forgotten items.

There are many situations where advanced technology and extensive experience are required for anomaly detection, but by using an object detection system, rapid and high-precision anomaly detection can be performed automatically compared to human monitoring.


・Obstacle Detection

Obstacle detection becomes possible through object detection systems. Since object detection can detect multiple target objects simultaneously, it is possible to instantaneously judge where and what exists and in what quantity.

Obstacle detection is indispensable for enhancing the safety of autonomous vehicles. To drive autonomously, signs, curbs, cars, and pedestrians must also be detected. Object detection systems accurately identify various target objects on the road, such as signs, curbs, other vehicles, and pedestrians, helping the vehicle take actions to avoid them.

With this technology, autonomous vehicles can accurately grasp the surrounding environment, enabling safe driving that rivals or even exceeds that of a human driver.


・Visual Inspection

In visual inspection, work efficiency and automation can be achieved by utilizing object detection technology. Since the system can accurately distinguish objects with similar structures, the accuracy of visual inspection can be dramatically improved.

Additionally, the system can recognize multiple target objects instantaneously. Since visual inspection can be performed faster than a human, it will also lead to a reduction in work time. This brings about the effect of significantly reducing quality control costs and time, particularly in the manufacturing industry.

Furthermore, depending on the system design, it is possible to inspect everything from large objects like buildings to small objects on the micron scale. Items that previously could only be inspected by specialized technicians may potentially be automated by utilizing the system.


・Marketing Analysis

By utilizing object detection to obtain information such as accessories and the gender/age group of possessors, it also plays an important role in marketing analysis. Because an object detection system can grasp multiple target objects simultaneously, it can process large amounts of data at once that a person could not process.

Additionally, through object detection within a store, information such as which products customers are showing interest in and which age group or gender of customers is purchasing specific products can be collected. Existing systems like POS registers often cannot automatically judge the demographic of the customer who made the purchase.

However, by utilizing an object detection system that can identify age groups and gender, target customer segments can be understood more accurately and automatically, which can be applied to effective promotional activities and product development.

 

・Traffic Flow Measurement

By utilizing object detection, traffic flow can be measured without human labor. If learned in advance, it is possible to measure the number of pets and buses in addition to cars and pedestrians.

Traffic flow measurement by humans carries the risk of oversights and missing counts, in addition to the number that can be recognized being limited. When measuring in locations with high traffic flow, introducing an object detection system may improve accuracy and achieve labor savings.

 

3. Steps for Building an Object Detection AI System

image (4)


An object detection system equipped with AI is built through the following steps:

  1. Dataset Collection
  2. Annotation
  3. AI Model Training
  4. AI Model Validation and Tuning
  5. AI Model Deployment

We will explain each of these.


① Dataset Collection

First, collect the data that will serve as the foundation for object detection. Depending on the system, thousands to tens of thousands of image data points are required. While considering the balance between the quantity and quality of data, let's build a mechanism that can collect efficiently.

Dataset collection is a very labor-intensive task, but if the quality of data is low, the precision of the AI model will also decline. Let's collect patiently by utilizing open data or data accumulated internally in the past.

It is essential to pay attention to data diversity and representativeness to ensure the AI model can learn information that reflects actual scenarios.

Points to consider when requesting annotation data collection are explained in detail below.

 

"A thorough explanation of how to collect data for machine learning! The steps to building a dataset and the benefits of outsourcing"

 

② Annotation

Once data is collected, add ground truth labels so that the AI model can recognize target objects. This is called annotation.
Annotation in object detection includes the following major methods for identifying target objects and teaching position information to the model:

Annotation Method Description
Bounding Box
(Introduction article)
Specifies the position by enclosing the target object with a rectangular frame (box).
One of the most common annotation methods.
Semantic Segmentation
(Introduction article)
Classifies each pixel in the image into a specific class (e.g., dog, cat, car).
Treats objects of the same class as a single set.
Instance Segmentation Performs classification at the pixel level like semantic segmentation.
Distinguishes different objects within the same class individually.
Point Annotation Places marks on specific points of the target object (e.g., center or corners of an object).
Suitable for identifying accurate positions or characteristic parts of target objects.
Polyline Annotation Represents the shape or outline of a target object by tracing it with lines.
Mainly used to indicate long shapes or paths such as roads, sidewalks, and rivers.
Landmark Annotation Annotates important characteristic points (landmarks) of specific target objects.
Used in facial recognition to identify characteristic points such as eyes, nose, and mouth.

Like dataset collection, this is a very labor-intensive task, but the quality of annotation directly relates to AI model performance. Let's perform it with high precision.

However, annotating thousands to tens of thousands of images with high precision requires an enormous amount of effort. If assigned to personnel unfamiliar with annotation, the work will likely take a considerable amount of time. It is recommended to deploy personnel with specialized knowledge and experience in annotation.

Many companies outsource annotation work when they lack annotation expertise or resources internally. The criteria for outsourcing versus in-house production and how to judge are explained in

 

"Should I outsource to an annotation company or do it in-house? How to choose a company? A comprehensive guide to the benefits of outsourcing!"

 

③ AI Model Training

Use the training data for which annotation has been completed to train the AI model.

Select a model appropriate for your purpose and provide data for training. It is common to use CNN or evolved object detection algorithms such as YOLO and R-CNN.
The AI model learns the features of target objects from the given data and increases detection precision.

④ AI Model Validation and Tuning

Once AI model training is complete, validate whether it has reached sufficient precision. What's important is to perform validation using new data that was not used for training. This allows for evaluation of how effectively the model functions against unknown data.

If there are issues with precision or processing speed, attempt improvements through dataset adjustment and tuning. Be sure to confirm not only high precision but also that it possesses a processing speed that can be utilized in actual practice.

If, despite introducing the system to shorten work time, it can only make judgments slower than visual inspection, the effect of implementation will be diminished. Many corrections may be necessary, but repeat validation until it becomes a system that meets your purpose.

 

 

⑤ AI Model Deployment

Once the AI model is completed, deploy it to the production environment so it can be used. At this time, explain the system overview and how to use it carefully so that onsite personnel can master the system.

After implementation, regularly check precision and processing speed to judge whether it is operating normally. Caution is required even after system construction as additional training may be necessary after implementation.

 

 

4. Points to Consider When Performing Object Detection

image (5)

 

When performing object detection, paying attention to the following points can enhance model precision:

  • Optimization of image resolution
  • Determine the subject's composition in advance
  • Ensuring data quality

We will explain each of these.


・Optimization of Image Resolution

Image resolution can increase processing speed by being suppressed to the required minimum. High-resolution images provide detailed information, but may affect processing speed.

Recently, large amounts of high-resolution images have become easily available, but there are many cases where object detection can be performed with sufficient precision even if the resolution is low. To make processing time as short as possible, try to suppress resolution as much as possible within a range that does not drop precision.

Additionally, if color is unnecessary, processing may become faster by reducing the data amount using grayscale instead of color images. It is good to check whether data volume is being allocated to unnecessary information.

However, when lowering resolution or using grayscale, it is necessary to carefully consider whether the required precision can be maintained.


・Determine the Subject's Composition in Advance

Determining the subject's composition in advance makes object recognition easier, thereby increasing precision and speed. If the composition can be fixed, it is better to determine it beforehand.

Additionally, by unifying the background, detection of target objects becomes easier, contributing to increased processing speed. Ensuring that unnecessary objects are not captured in the background reduces the effort required for screening target objects, thereby increasing processing speed. Devise ways to avoid burdening the system, such as unifying the background color.

It is important to determine the composition while considering the contrast between the subject and the background.

 

・Ensuring Data Quality

Model performance involves not only the quantity but also the quality of training data. While it is easy to focus only on data quantity, be sure to also ensure data quality. If quality is not ensured, the need to exclude low-quality data arises at the learning stage, and the collected data will be wasted.

To enhance data quality, construction of balanced datasets and execution of high-quality annotation are necessary. Since this requires knowledge and experience concerning data, you may consider consulting an expert if you lack internal expertise.

 

5. Summary

Training data is essential for AI, and its high precision leads to high precision in the AI. To create high-quality training data, there are various elements such as high-technology annotation, extensive specialized knowledge, and a solid management structure.

Because annotation work, such as tagging large amounts of data, appears to be a simple task at first glance, companies sometimes suppress labor costs by requesting services from individual crowdsourced workers or offshore companies. However, in such cases, even if work content and rules are determined, problems arise where precision becomes low because workers cannot understand or lack knowledge, and training data of the desired quality cannot be obtained. Not only high-technology workers but also the creation of an organization that can manage them and achieve objectives and deadlines is necessary.

Additionally, in creating training data, it is not easy to completely eliminate human error even if annotation technology is high and a quality management structure is in place. By responding accurately and quickly when errors occur, reliable data can be built up.

By clearing these elements, high-quality training data can be created, leading to high-precision AI.

Additionally, in "What is a bounding box? How is it used in YOLO? A thorough explanation of the advantages and disadvantages of object detection methods," we provide a detailed explanation of the benefits, drawbacks, and representation methods of bounding boxes, which are frequently used in object detection for image analysis. Reading it together will further deepen your understanding of this article.

 

Nextremer offers data annotation services to achieve highly accurate AI models. If you are considering outsourcing annotation, free consultation is available. Please feel free to contact us.

 

 

Author

 

nextremer-toshiyuki-kita-author

 

Toshiyuki Kita
Nextremer VP of Engineering

After graduating from the Graduate School of Science at Tohoku University in 2013, he joined Mitsui Knowledge Industry Co., Ltd. As an engineer in the SI and R&D departments, he was involved in time series forecasting, data analysis, and machine learning. Since 2017, he has been involved in system development for a wide range of industries and scales as a machine learning engineer at a group company of a major manufacturer. Since 2019, he has been in his current position as manager of the R&D department, responsible for the development of machine learning systems such as image recognition and dialogue systems.

 

Latest Articles