What Is Image Recognition?
3 things you need to know
3 things you need to know
Image recognition is the process of identifying an object or a feature in an image or video. It is used in many applications like defect detection, medical imaging, and security surveillance.
Image recognition can speed up tedious tasks and process images faster or more accurately than manual image inspection. Image recognition is a crucial technique in many applications, and is the main driver in deep learning applications like:
Image recognition is the core technology at the center of these applications. It identifies objects or scenes in images and uses that information to make decisions as part of a larger system. Image recognition is helping these systems become more aware, essentially enabling better decisions by providing insight to the system.
Image recognition and object detection are similar techniques and are often used together. Image recognition identifies which object or scene is in an image; object detection finds instances and locations of those objects in images.
Common object detection techniques are Faster R-CNN and YOLOv3.
Image recognition (left) and object detection (right).
There are many methods for image recognition, including machine learning and deep learning techniques. The technique you use depends on the application but, in general, the more complex the problem, the more likely you will want to explore deep learning techniques.
A deep learning approach to image recognition can involve the use of a convolutional neural network to automatically learn relevant features from sample images and automatically identify those features in new images.
A typical deep learning workflow for image recognition:
Prepare Training Data: Start with a collection of images and compile them into their associated categories. This could also include any preprocessing steps to make the images more consistent for a more accurate model.
Create a Deep Learning Model: While you can build a deep learning model from scratch, it may be best to start with a pretrained model that you can use as a starting point for your application. (Learn more about pretrained models).
Train the Model: Model training involves presenting the test data to the model. The model then iterates over the data multiple times and automatically learns the most important features relevant to the images. As the training continues, more sophisticated features will be learned by the model, until the model can accurately decipher between the classes of images in the training set.
Test Data: Test on new data that the model hasn’t seen before to see what the model believes the image to be. If results are not what you are expecting, iterate on these four steps until the accuracy is more acceptable.
Deep learning techniques may sound complicated, but simple examples are a great way of getting started and learning more about the technology.
Tip: Deep learning techniques are popular for image recognition because they provide highly accurate and robust results. Deep learning tends to work best with a large amount of training data, and techniques such as transfer learning can simplify the image recognition workflow. Deep Learning Toolbox™ provides a framework for designing and implementing deep neural networks with algorithms, pretrained models, and apps.
A machine learning approach to image recognition involves identifying and extracting key features from images and using them as input to a machine learning model.
You can use a variety of machine learning algorithms and feature extraction methods, which offer many combinations to create an accurate object recognition model.
Machine learning example with image recognition to classify digits using HOG features and an SVM classifier.
Tip: Using machine learning for object recognition offers the flexibility to choose the best combination of features and classifiers for learning. It can achieve accurate results with minimal data. Statistics and Machine Learning Toolbox™ provides functions and apps to describe, analyze, and model data.
Image Recognition: Deep Learning vs. Machine Learning
How do you know when to use deep learning or machine learning for image recognition? At a high level, the difference is manually choosing features with machine learning or automatically learning them with deep learning.
Aside from deep learning and machine learning, many classic image processing methods are very effective at image recognition for some applications. Image processing techniques tend to be well suited to “pixel-based” recognition applications such as:
MATLAB® simplifies the hard parts of image recognition.
Clean, preprocessed data ensures the best opportunity for success with image recognition. With the Image Labeler app, you can automate the process of cropping and labeling images.
When first starting out, it may be unclear whether to use deep learning or machine learning techniques. MATLAB offers the ability to try all combinations of approaches. Explore pretrained models for deep learning, or machine learning classification algorithms.
You can interoperate with networks and network architectures from frameworks like TensorFlow™, Keras, PyTorch and Caffe2 using ONNX™ (Open Neural Network Exchange) import and export capabilities.
Ultimately, your algorithm may need to live outside the desktop environment. MATLAB provides code generation tools to deploy your image recognition algorithm anywhere: the web, embedded hardware, or production servers.
After creating your algorithms, you can use automated workflows to generate TensorRT or CUDA® code with GPU Coder™ for hardware-in-the-loop testing. The generated code can be integrated with existing projects and can be used to verify object detection algorithms on desktop GPUs or embedded GPUs such as the NVIDIA® Jetson or NVIDIA Drive platform.
Expand your knowledge through documentation, examples, videos, and more.
Explore similar topic areas commonly used with MATLAB and Simulink products.
30-Day Free Trial
Get startedSelect a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Image recognition in a visual inspection application for part defects.
Machine learning workflow for image recognition.
Machine learning example with image recognition to classify digits using HOG features and an SVM classifier.
Label images and videos interactively.
Integrate with Python-based frameworks.