Types of image annotation for machine learning

Natalie Kudan
by
Image

Subscribe to Toloka News

Subscribe to Toloka News

Annotating image data resembles the way people learn a new foreign language by attaching a sticker to an object that contains its name written in a new language to remember the foreign word. It is the same with annotation: data is assigned a tag that allows AI engines to recognize it.

The following information will give you an overview of image annotation, its purpose, and its importance in today's world if you are:

  • An owner of a company that deals with the processing of massive volumes of data.
  • An AI or ML professional embarking on an introduction to methods of process improvement.
  • A beginner annotation specialist questioning what types of image annotation there are.
  • An enthusiastic individual who enjoys delving into AI processes.
  • Simply someone who is intrigued with modern technology and developments.

This article is entirely dedicated to understanding what data annotation is and describing what the different types of data annotation processes exist, as well as what they are used for.

Get high-quality data. Fast.

Try Toloka Hybrid Labeling for image, audio, or text annotation from LLM+Humans in 40+ languages
Talk to us
Image

What is image annotation in machine learning?

Annotating (also labeling or tagging) the data refers to the process of categorizing, labeling, or deciphering information by adding metadata to a given data set, thus making certain objects recognizable to AI engines.

Image annotation is the process of detecting objects in raw data, specifically in images, by applying labels to them, which assists a machine learning model to generate precise estimates and predictions.

The major issue with recognizing objects in images is that machines simply don't visualize things the way humans do. Instead, they comprehend nothing but the language of binary numbers. What they do is utilize image annotations to figure out and distinguish the object. Thus, through multiple repetitions of such an operation of identifying items, the software learns through annotated images. The program embodiments of neural networks, which specialists have been lately using more and more for image recognition, possess such a property. The learning capability of neural networks represents one of their key strengths over conventional algorithms.

Through neural networks, computers can recognize objects in images, and this in turn relies on image annotation. Subsequently, they enabled the creation of software that was able to annotate images on its own, although still not without the help of people.

The mission of every machine learning process is to provide quality training for the AI program, or more precisely, to assist in the quick detection of patterns in the input data, so that the artificial intelligence can then perform its task more accurately. None of this would be achievable unless data labeling existed since labeled data is sort of a textbook for training artificial intelligence.

Reasons to perform image annotation

Image annotations enable computers to visualize items in pictures thus enabling such an area of artificial intelligence as Computer Vision (CV). CV is about building a human-like vision system on a computer, which means designing software that is capable of responding to any image-related question in a way that a human would.

Machine learning is applied to train a computer vision ML model with a high volume of data gathered by image annotation, allowing the ML model to generate accurate predictions when new, untagged data is introduced. Once experts have trained the system on such a dataset, then it may solve real-world problems, for example:

  • Scan barcodes, QR codes, and other ID codes recognition for goods tracking, and the implementation of logistics;
  • Identify facial features and emotions in digital security so that AI systems can identify individuals in images and CCTV footage;
  • Detect vehicles, roads, structures, pedestrians, cyclists, and miscellaneous objects in images and videos to assist automated automobiles in distinguishing and avoiding collisions with such entities;
  • Perform diagnostic analysis and disease recognition on medical scans.

It's worth noting that these are far from all the applications of computer vision systems.

Merely collecting a large amount of unstructured data is not going to help you implement it in any way. Before you can start applying the dataset for training, you have to process it. This is where data labeling comes in handy. The addition of one or more labels to the given dataset indicates the target responses that the machine learning model has to learn to forecast. A label shows the machine learning system the meaning of a particular piece of data, so it can study it as an example.

Labeling images refers to the preprocessing of images, which makes the objects in the picture comprehensible to ML models. Neural networks are the most sophisticated realization of machine learning, and therefore they are more human-like in their judgments.

A similar situation arises when ML models analyze medical scans to identify neoplasms in a patient or to study the shape of a person's organs. For artificial intelligence to know how to give the correct answers to these questions, first a human has to solve this task for it. That is, a real person has to prepare the data for machine learning, in other words, to label the data.

Image annotation process

The image annotation process commonly involves manual work, with occasional assistance from a machine. The labeling of data has sparked the emergence of a new profession called data annotators. Essentially, these are people who label objects and/or verify the labeling efforts of artificial intelligence.

Some specific types of images require annotators to possess certain extra skills, for example, when annotating medical scans, the professional has to have a certain degree of medical knowledge.

First of all, to resolve the problem of gathering a labeled image dataset, specialists must assemble an unlabeled dataset, decide on the labels they need to have, and then label all the necessary objects on it. Currently, a huge quantity of reference collections with labeled objects already exist, although often, for new projects, the experts gather their own sets of raw data and label objects on them from scratch to meet the specific objectives. For instance, flowers of certain species are tagged in photos so that the system can recognize different plant families in the future.

A machine learning professional decides on certain labels and supplies information related to the image to the computer vision system. Once the CV model is trained and deployed, it will be equipped with the ability to anticipate and recognize those predefined objects in the new images that have not yet been labeled.

How to annotate image data?

Regardless of the nature of the work and the goals of the project, image annotation is generally carried out in several steps.

Data collection and preprocessing

Image annotation primarily assumes the availability of one or more datasets. In order to build a dataset for image annotation it is necessary to assemble the required amount of raw data.

Professionals employ image data for training as the input collection of digital images, photos, and pictures to provide to the machine-learning model to train it. A large body of diverse relevant data is generally required to ensure more accurate results for the model.

Image annotation experts can utilize publicly available data sets for ML projects, something that is now not in short supply, or they can access data that a business has been piling up for years or start collecting from scratch altogether. Nevertheless, these kinds of data are frequently inconsistent, corrupted, or merely inappropriate for the task at hand. Thus, before tagging data, it should be refined and pre-processed, for example, to remove noise or increase contrast.

Defining goals for image annotation

After all the necessary images are found, annotators have to define the exact goals and objectives of labeling before the actual image annotation, which means determining exactly how and what should be labeled, what is the anticipated final result, plus, most importantly, what it should be used for.

Data labeling

Next, data annotators study the content, highlight objects, and attach labels to it. Thus, they add meaningful context in the form of labels to the image. At the end of this stage, training data includes image annotations, like bounding boxes, classes, or choices. Machine learning models explore the annotations of training data so that they could process new, untagged content in the future. Models will not be able to learn without annotations.

Quality control

The training quality of the AI closely correlates with the accuracy of the annotated image data. When objects in the images are incorrectly labeled, the whole ML model will perform poorly. For instance, it will incorrectly indicate plant species in a photo or inaccurately give a diagnosis when analyzing X-rays. The tagged data has to be of the highest quality, trustworthy, precise, and coordinated. To ensure tagging reliability and optimization, consistent quality checks should be implemented.

Training and testing

Training and testing the model is a logical follow-up to the previous steps. Once experts have trained the system with labeled images, they test it on an unlabeled dataset. Specialists check AI to ensure that it delivers the anticipated predictions or estimates.

As previously mentioned, data annotators may, in addition to the manual image annotation of objects, engage in annotation verification performed by artificial intelligence. Such labeling is referred to as automatic, but today it cannot be fully automated, as humans still seem to play an integral role when employing this sort of annotation.

Image annotation process: manual vs automated

By far the most widespread and simplest approach to data labeling involves completely manual processing. It requires a lot of laborious and high-cost efforts, which in turn demands a great attention span and concentration as well as constant quality control of the process. The slightest error in labeling determines the precision and performance of the whole model.

The amount of time it takes to label the images greatly varies depending on the complexity of the images, the number of objects, the type of labels, as well as the precision and level of detail required.

Some projects employ multiple operators to annotate the identical elements of data, with the results being merged or compared for quality control, proportionally multiplying the cost and time of image annotation.

An annotator is presented with a bunch of raw image data, and then is given the assignment to annotate it in accordance with a checklist of rules. They annotate images manually using dedicated software and image annotation tools to highlight object edges and caption them with text. The most commonly encountered types of image annotation are classification tags, bounding boxes, polygonal segmentation, and key spots. More about the types further on.

Apart from time, labeling carried out entirely by humans is quite a costly task, particularly if huge sets of data had to be labeled, while the number of people involved in image annotation may vary from tens to several thousand employees, depending on the project.

We would not be able to train ML algorithms without tagged data. This is why many strive to develop efficient ways to quickly and cost-effectively tag the data. Because of this, the technologies that enable the implementation of automated tagging are evolving at a great pace, as evidenced by the huge amount of image annotation tools available today on the market. From the point of view of engaging image annotation specialists, today there is a broad choice of options.

Data annotation is performed by in-house specialists

This is the most reliable approach in regard to the precision of the tagged data since fulfl supervision is provided at every phase of the tagging process. However, at the same time, it is also considered one of the costliest and most time-consuming methods, often requiring a huge team of employees. In companies which entrust image annotation tasks to their own internal teams, labeling crews may be already prepared for the task or may require preliminary training.

Outsource data labeling to third-party companies or freelancers

To annotate the data, you may hire an outside company or build a team of independent annotators, the majority of whom will be freelancers who can be reached through specialized sites such as freelance marketplaces, as well as through social networks.

Initially, the company must establish a coherent workflow involving these professionals. After that it has to coordinate their responsibilities, negotiate the appropriate image annotation software and develop detailed manuals, however, specialized companies often choose the necessary image annotation tool and techniques, not necessarily revealing them to the customers. The quality of the tagged data will rely on the trustworthiness and responsibility of the contractor or freelancers.

Crowdsourcing

It allows the distribution of the image annotation tasks among hundreds or thousands of performers, each preparing a minor portion of the dataset. Performers on crowdsourcing platforms choose and complete various types of tasks. Such micro-tasks are executed and verified by many contributors, oftentimes working in small groups, before being aggregated to produce the final results.

This method is most often the cheapest and easiest to scale, but the major issue with this approach remains the precision of the data labeling. Proper data processing requires properly formulated and communicated objectives, quality control, and overall process setup.

Automation

Automated labeling is intended to simplify and reduce the cost of manual work. It refers to a feature of the image annotation process that employs artificial intelligence (AI) to enhance, annotate, or label a set of data. With this function, the image annotation tool supports the work of people, thereby reducing the time and money involved in tagging data for machine learning.

While automated tools help speed up image annotation and make the process cheaper, the human element is still essential to ensure a consistent level of quality. Human operators oversee automation by controlling, revising, and supplementing annotations. Automation is far from perfection, therefore, human involvement in error oversight and fixing is imperative.

Image annotation types

Image annotation projects are accomplished through a variety of techniques and processes. A dedicated image annotation tool is necessary to initiate the annotation. It should be equipped with all the relevant functions and features, along with the instruments essential for annotating images according to the requirements of different projects. Annotations exist in many forms, here are some of them.

Image annotation with the help of lines and splines

Plain lines are sometimes a good way to annotate items in an image. Image annotation with lines and splines is beneficial in various cases of use, ranging from self-driving vehicles and drones to warehouse robots, and so on. The task of annotators in this case is to anchor road lanes, routes, sidewalks, electrical supply lines, and other indicators of boundaries.

The images labeled by lines and splines are mostly employed for the recognition of traffic lanes, tracks, and edges, as well as for the planning of self-driving cars, drones, and storage robot paths. Lines make it easy for cars and flying machines to determine the limits. Likewise, they are utilized to teach vehicles and systems in a variety of situations and events to better assist them in decision-making while driving or flying.

2D bounding box image annotation

One of the most frequently employed image annotation techniques, represented by rectangular frames employed to determine the position of an object in an image. This annotation type is best suited for symmetrical objects. Labeling of this sort employs a bounding box surrounding the object in the picture to attribute specific details pertaining to a distinct element. It helps train the model for object detection, which estimates their position in the frame. Such systems are frequently applied to count and track objects in images or videos. They can, for example, recognize and count individuals in surveillance videos.

When using two-dimensional bounding boxes, annotators have to draw a rectangle around the item they intend to annotate within the image. Sometimes all these target objects are of the same class. On other occasions, there may be more than one target object class. In these cases, once the specialists have finished drawing the frame, they will then have to pick a class from a list of labels.

Cuboid or 3D bounding box annotation

Three-dimensional versions of 2D bounding boxes would be cuboids. 3D bounding boxes are essentially the same as 2D bounding boxes, except that they also deliver detailed insights into the object's depth. This image annotation is useful when it is important for the project to indicate the object's dimensions. With cuboids you can get a 3D representation of the object, allowing systems to distinguish features like volume and position in a 3D space.

Similar to 2D bounding boxes, the annotators create rectangles, except in 3D, around the target objects, ensuring that anchor points are positioned on the edges of the item to specify 3 crucial features - length, depth, and width. Annotating images with cuboids gets tricky in cases where the object is only partially visible, therefore sometimes it is simply not possible to create a 3D box around an object.

Image classification

Whereas bounding boxes are concerned with annotating numerous items in a picture, image classification refers to the act of associating the entire image with just one label. Image classification describes a form of image annotation that attempts to determine the presence of similar objects present in the images across the entire dataset.

Image annotation is carried out at the highest level, without going into too much detail. It means that a photo of a garden with various plant species may be labeled with a single tag like "nature" and not with a variety of different tags like "flower", "bush", "grass", etc.

The annotators employ classification to train the machine to recognize an object in an unlabeled image that is similar to an object in other already-labeled images that the experts have already applied to train the machine.

Polygonal image segmentation

Items in pictures usually aren't perfectly symmetrical or of the right shape. Annotators employ polygon techniques to accurately annotate irregular forms and items. Polygons help with true object shape representation. Specialists alter the direction whenever necessary to shape the object correctly. Dots are placed along the boundaries of the objects, and the lines are manually traced circumferentially or along the perimeter of the object. After tracing an object on the image, the annotator will label it with a tag that describes the object's properties.

Polygons may trace more angles and lines than other types of image annotation. Since the real world contains more non-rectangular shapes, polygons represent a more suitable option for annotating images than bounding boxes.

Skeletal or key point image annotation

The method works best for identifying intricacies in the objects' motions in an image or video footage. The key points are specifically applied in the recognition of faces to annotate facial characteristics, gestures, expressions, poses, and more. During the process, the annotator has to label all the key points according to the logic of the task.

Some purposes employ points of different colors according to the different classes of the objects or parts of the body. The reason for this is to allow the model to more clearly assess the positions and movements of the respective object parts or limbs of the body.

Semantic image segmentation

A semantic segmentation approach involves annotating individual pixels within a picture. Rather than handing annotators a catalog of items to annotate, they are presented with a set of segment labels to divide the image into. This sort of labeling enables more precise estimation of the interactions between the pixels in every object. Thus, it is essential that the annotator carefully and precisely labels the necessary classes of objects along their outline.

Semantic segmentation implies dividing an image into distinct pixel groupings. Each group belongs to a specific object and is highlighted by its contour, forming a color mask. Semantic segmentation is beneficial in cases when it is critical not only to determine the position of each object in the frame but also to evaluate the exact pixels of each object.

Side-by-side comparison

Side-by-side comparison is a type of data labeling where annotators compare two pictures and pick the one that is more appropriate for specific tasks. Such tagging works for projects where a company has to figure out, for example, which interface layout users like more, or which image is suited for targeting ads.

Although there is no single uniform classification, the above types are the primary image annotation approaches at the moment.

Challenges in image annotation

Errors

Manual annotation is susceptible to human mistakes, regardless of the level of knowledge and expertise of the annotators. There are various ways to deal with errors, for instance, adding control tasks to ensure that annotators are paying attention.

Time and costs

Manual data labeling is a time-consuming and labor-intensive process. Labeling of each data element, as well as the assembly of extensive datasets, constitute difficult, time-consuming, and costly tasks. Crowdsourcing and automation are usually employed to deal with this risk.

Expertise requirement

To be able to label data, you may need to employ professionals who are competent in specific fields. One of the ways to mitigate such a risk is to divide complex tasks into microtasks. Experts provide detailed instructions and control the end result, while people without their level of expertise perform labeling according to instructions.

Inconsistency

In cross-labeling, a collaborative procedure where multiple annotators annotate identical datasets due to varying levels of expertise, labeling criteria, and discrepancies in tagging, two or more of them may have conflicting views on certain labels. Data scientists employ various aggregation techniques to ensure a desired level of accuracy and certainty of labeled data.

Conclusion

Artificial Intelligence has firmly entered our everyday life. The future evolution of any industry will not be conceivable without the implementation of AI products. Image annotation is an integral part of the development of artificial intelligence systems as well as a major task in developing computer vision models.

With the help of arrays of labeled data, the ML model learns and eventually recognizes similar objects on its own without human assistance. Labeling is essential for training computers so that they can observe objects around them in much the same way humans do.

Various types of image annotation exist and serve their respective purposes. Thus, 2D frames or boxes are useful for labeling simple, symmetrical objects, and for counting the number of items in a picture. To indicate the volume and location of objects in 3D space, specialists employ cuboids, and to indicate the poses or facial expressions of a person - key point annotation, and many others.

Subject to the goals of your project, you may select the type of annotation that works best for you. Creating modern AI technological innovations in the field of computer vision today is possible only with the proper type of image annotation.

Article written by:
Natalie Kudan
Updated: 

Recent articles

Have a data labeling project?

Take advantage of Toloka technologies. Chat with our expert to learn how to get reliable training data for machine learning at any scale.
Fractal