Feature learning vs.feature engineering

10.2.2023
Image Processing

Image Analysis Gets a Deep Learning Upgrade

Feature learning vs. feature engineering

Have you ever wondered why deep learning is often preferred over traditional machine learning?

Do you want to learn the key difference between these techniques that gives deep learning an edge over machine learning?

Do you want to train your own deep learning without the need to code?

If you answered yes to any of these questions, you are reading the right article.

What is feature engineering for machine learning ?

Traditional machine learning techniques often rely on feature engineering, which is the process of manually extracting relevant features from raw data to be used as inputs for a model. This can include techniques such as using Gabor filters to detect texture in images. Gabor can generate an infinite number of features, but the key is finding the correct parameters for the kernel to extract the appropriate features. These parameters include wavelength (lambda), orientation (theta), phase offset (phi), the standard deviation of the Gaussian envelope (sigma), and spatial aspect ratio (gamma). As shown in Figure 1, horizontal bars can be extracted by using a kernel with a theta value of pi/2, and vertical bars can be extracted using a kernel with a theta value of pi. However, in real-life images, there is added complexity that makes it difficult to determine which parameters will work effectively.

Figure 1. Gabor features extracted from a synthetic image showing horizontal and vertical aligned objects. As part of feature engineering, Gabor parameters were adjusted to extract the relevant information from the image.

Even experienced engineers have difficulty determining the correct parameters for a specific problem. As a result, it is common to generate a large number of features by varying all parameters and allowing the machine learning algorithm to determine which ones are the most important. Although this method is effective, it is not an efficient way to tackle challenges using machine learning, especially when there is a large amount of training data available.

Feature Learning in CNN

Deep learning, on the other hand, is a form of machine learning that uses neural networks to automatically learn features from raw data. The layers of a neural network can be thought of as a hierarchy of features, where each layer learns increasingly complex features. See Figure 2.

Figure 2. The VGG16 model is made up of multiple convolutional blocks. The network can learn and identify features in a hierarchical manner through these different convolutional layers.

For example, in the VGG16 model that has been trained on the ImageNet dataset, the early layers learn basic features such as edges and textures, while the later layers learn more complex features such as object parts and entire objects. In Figure 3, a variety of features are displayed that have been extracted from the same image as seen in Figure 1, utilizing the second convolutional block from the VGG16 network that has been pre-trained on the Imagenet dataset. No feature engineering was needed as the model had already been trained on a vast number of images. Deep learning allows for both learning the features and using them.  These features can be utilized as input for traditional machine learning techniques such as Random Forest or further fine-tuned for this specific application through additional deep learning training.

Figure 3. Features obtained from the input image in Figure 1 using the second convolutional block of the VGG16 network pre-trained on the Imagenet dataset.

Say Goodbye to Feature Engineering, Hello to Automated Features

To put it simply, deep learning is favored over traditional machine learning due to its superior ability to perform feature learning eliminating the need for human-designed feature engineering. Furthermore, deep learning can deal with complex relationships between features and the target variable, making it especially effective when there is a large amount of training data.

Due to its advantages in feature learning and handling complex relationships, deep learning is rapidly gaining popularity in the field of scientific image analysis. With the development of products like arivis Cloud, even those with no coding skills can train custom deep-learning models with a relatively small number of training images. arvis Cloud makes the process of deep learning training simple and accessible, enabling more people to leverage the powerful capabilities of deep learning for scientific image analysis.

Sign up for a free arivis Cloud trial today!

Individual students can directly enroll in the free arivis Cloud subscription for their personal projects.

arivis Cloud by ZEISS

An easy-to-use software solution from ZEISS for automated image analysis in the cloud. The no-code interface allows any researcher to train and customize AI-based image segmentation models, for reproducible and reliable results.

https://www.apeer.com/home/

Sreenivas Bhattiprolu

Dr. Sreenivas Bhattiprolu's team at ZEISS focuses on solving tough microscopy challenges by leveraging the latest advancements in digital technology and artificial intelligence. Dr. Bhattiprolu has over 25 years of experience in microscopy. He received his Doctorate in Materials Sciences and Engineering from Michigan Technological University and earned his Master’s degree in Physics from the University of Hyderabad.

Related Posts

Stay in touch with our newsletter!

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form