• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Articles
  • News
  • Events
  • Advertize
  • Jobs
  • Courses
  • Contact
  • (0)
  • LoginRegister
    • Facebook
    • LinkedIn
    • RSS
      Articles
      News
      Events
      Job Posts
    • Twitter
Datafloq

Datafloq

Data and Technology Insights

  • Categories
    • Big Data
    • Blockchain
    • Cloud
    • Internet Of Things
    • Metaverse
    • Robotics
    • Cybersecurity
    • Startups
    • Strategy
    • Technical
  • Big Data
  • Blockchain
  • Cloud
  • Metaverse
  • Internet Of Things
  • Robotics
  • Cybersecurity
  • Startups
  • Strategy
  • Technical

Robust Image Classification with a Small Data Set

Max Ved / 7 min read.
November 6, 2019
Datafloq AI Score
×

Datafloq AI Score: 87.33

Datafloq enables anyone to contribute articles, but we value high-quality content. This means that we do not accept SEO link building content, spammy articles, clickbait, articles written by bots and especially not misinformation. Therefore, we have developed an AI, built using multiple built open-source and proprietary tools to instantly define whether an article is written by a human or a bot and determine the level of bias, objectivity, whether it is fact-based or not, sentiment and overall quality.

Articles published on Datafloq need to have a minimum AI score of 60% and we provide this graph to give more detailed information on how we rate this article. Please note that this is a work in progress and if you have any suggestions, feel free to contact us.

floq.to/zDDou

One of the biggest myths about AI is that you need to have a large amount of data to obtain sufficient accuracy and the rapid development of Big Data analytics seems to prove this intuition. It is true, that deep learning methods require model training on a huge number of labeled images. However, in image classification even a small collection of training images may produce a reasonable accuracy rate (90 ‘100%) if using new machine learning techniques, that either make use of previously collected data to adjacent domains or modify the classification process completely, working on similarity of images.

Knowledge Cross-Utilization

Similar to human capability to apply knowledge obtained in one sphere to related spheres, machine learning and deep learning algorithms can also utilize the knowledge acquired for one task to sole adjacent problems.

Even though traditionally ML/DL algorithms are designed to work in isolation to address specific tasks, the methods of transfer knowledge and domain adaptation are aimed to overcome the isolated learning paradigm to develop models which would be closer to a human way of learning.

Transfer learning

Transfer learning is the method that generalizes knowledge, including features and weights, from previously learned tasks and applies them to newer, related ones that lack data. In computer vision, for instance, certain low-level features, such as edges, shapes, corners and intensity, can be shared across multiple tasks.

image-classification

To understand how it works, we can use the framework presented in the paper, A Survey on Transfer Learning (Pan & Yang 2010) where they use domain, task, and marginal probabilities:

A domain D consists of two components: a feature space X and a marginal probability distribution P(x), where x ” X . As a rule if two domains are different, they may have different feature spaces or different marginal probability distributions.

Similarly, a task T consists of two components: a label space Y and a predictive function f(‘ ), i.e., a mapping from the feature space to the label space. From a probabilistic viewpoint, f(x) can also be written as the conditional distribution P(y|x). Based on these representations, transfer knowledge can be defined as follows: given a source domain Ds and learning task Ts, a target domain Dt and learning task Tt, transfer learning aims to help improve the learning of the target predictive function fT (‘ ) in DT using the knowledge in DS and TS, where DS DT , or TS TT, T = {Y, f(‘ )}.(Pan & Yang 2010) In most cases, it is assumed that there is a limited number of labeled target examples, which is exponentially smaller than the number of labeled source examples are available.

To explain how transfer learning can be used in a real-life, let’s look at one particular application which is learning from simulation. Simulation is the preferred tool for gathering data and training a model rather than collecting data in the real world. While learning from a simulation and applying the acquired knowledge to the real world, the model uses the same feature spaces between source and target domain (both generally rely on pixels). However, the marginal probability distributions between simulation and reality are different, so objects in the simulation and the source look different, although this difference diminishes as simulations become more realistic.

Further reading

SJ Pan, Q Yang (2009). A survey on transfer learning. IEEE Transactions on knowledge and data engineering 22 (10), 1345 ‘1359 [PDF]

Domain adaptation

Usually considered a subfield of transfer knowledge, domain adaptation refers to the method of fighting the so-called domain shift challenge: since the distribution of data in the target domain is different than in the source domain and there exists the similar gap between the marginal probabilities between the source and target domains, such as P(Xs) ” P(Xt), there is a need to devise models that can cope with this shift.

To achieve successful unsupervised domain adaptation we need to cover three main aspects:

  • domain-agnostic feature extraction: the distributions of features extracted from both domains should be indistinguishable as judged by an adversarial discriminator network;
  • domain-specific reconstruction: embeddings should be decoded back to the source and target domains;
  • cycle consistency: to ensure that the mappings are learned correctly, we should be able to get back where we started.

The simplest approach to unsupervised domain adaptation is building a network to extract features that remain the same across the domains by making them indistinguishable for a separate part of the network, a discriminator. But at the same time, these features should be representative for the source domain so the network will be able to classify objects. As the approach is unsupervised, we don’t have to have any labels for the target domain, only for the source domain, and in many cases, for synthetic data.

Alternatively, domain adaptation can map the source data distribution to the target distribution. Both domains X and Y could be mapped into a shared domain Z where the distributions are aligned. This embedding must be domain-agnostic, hence we want to maximize the similarity between the distributions of embedded source and target images.

Further reading

Murez, Zak & Kolouri, Soheil & Kriegman, David & Ramamoorthi, Ravi & Kim, Kyungnam. (2017). Image to Image Translation for Domain Adaptation. [PDF]

Pinheiro, Pedro H. O.( 2018). Unsupervised Domain Adaptation with Similarity Learning. IEEE/CVF Conference on Computer Vision and Pattern Recognition (2018): 8004 ‘8013. [PDF]

Similarity-based approaches

An alternative to direct classifying of an input image to any of the output classes is measuring the similarity between images by learning a similarity function.


Interested in what the future will bring? Download our 2023 Technology Trends eBook for free.

Consent

Few-shot learning

Few-shot learning is an object categorization problem mostly in computer vision. In contrast to other ML-based algorithms, few-shot learning aims to learn information about object categories from a single (the so-called one-shot learning) or a few training images. In addition to the input image, it also takes a reference image of a specific object as input and produces a similarity score denoting the chances that the two input images belong to the same object.

In its simplest form, one-shot learning method computes a distance-weighted combination of support set labels. The distance metric can be defined using a Siamese network that uses two identical fully connected CNNs with same weights and accepting two different images. The last layers of the two networks are then fed to a contrastive loss function, which calculates the similarity between the two images.

The first network outputs the encoding/vector of the image being queried and the second network, correspondingly, the encoding/vector of the reference image from the dataset. Afterwards, the two encodings are compared to check whether there is a similarity between the images. The networks are optimized based on the loss between their outputs by using the triplet loss or the contrastive lost functions.

The triplet loss function is used to calculate gradients and is represented as follows:

Formula

where a represents the anchor image (or the reference image from the data set), p represents a positive image and n represents a negative image. We know that the dissimilarity between a and p should be less than the dissimilarity between a and n. Another variable called margin is added as a hyperparameter to defne how far away the dissimilarities should be, i.e if margin = 0.2 and d(a,p) = 0.5 then d(a,n) should at least be equal to 0.7.

The contrastive loss function is given as follows:

Formula

where Dw is the Euclidean distance between the outputs of the sister Siamese networks. Mathematically the Euclidean distance is represented as follows:

Formula

where Gw is the output of one of the sister networks. X1 and X2 is the input data pair

The loss functions calculate the gradients that are used to update the weights and biases of the Siamese network. The loss will be smaller if the images are similar and will be further apart when images are not similar.

Development of the approach can be seen in the method by Santoro et al. (2016) using Memory-Augmented Neural Network (MANN). In their model, a neural network extended with an external memory module so that the model is differentiable and can be trained end-to-end. Thanks to their training procedure, they forced the network to learn general knowledge whereas the quick memory access allowed to rapidly bind this general knowledge to new data.

Further reading

Li Fei-Fei, Rob Fergus, and Pietro Perona (2006). One-shot learning of object categories. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(4):594 ‘611. [PDF]

Koch, Gregory, Richard Zemel, and Ruslan Salakhutdinov.Siamese neural networks for one-shot image recognition.2015. [PDF]

Santoro, Adam, Bartunov, Sergey, Botvinick, Matthew, Wierstra, Daan and Lillicrap, Timothy P. (2016). One-shot Learning with Memory-Augmented Neural Networks. CoRR abs/1605.06065. [PDF]

Categories: Artificial Intelligence
Tags: AI, Artificial Intelligence, Big Data, image analytics, Images

About Max Ved

SciForce is a Ukraine-based IT company specialized in development of software solutions based on science-driven information technologies.

We have wide-ranging expertise in many key AI technologies, including Data Mining, Digital Signal Processing, Natural Language Processing, Machine Learning, Image Processing and Computer Vision.

Primary Sidebar

E-mail Newsletter

Sign up to receive email updates daily and to hear what's going on with us!

Publish
AN Article
Submit
a press release
List
AN Event
Create
A Job Post

Related Articles

The Advantages of IT Staff Augmentation Over Traditional Hiring

May 4, 2023 By Mukesh Ram

The State of Digital Asset Management in 2023

May 3, 2023 By pimcoremkt

Test Data Management – Implementation Challenges and Tools Available

May 1, 2023 By yash.mehta262

Related Jobs

  • Software Engineer | South Yorkshire, GB - February 07, 2023
  • Software Engineer with C# .net Investment House | London, GB - February 07, 2023
  • Senior Java Developer | London, GB - February 07, 2023
  • Software Engineer – Growing Digital Media Company | London, GB - February 07, 2023
  • LBG Returners – Senior Data Analyst | Chester Moor, GB - February 07, 2023
More Jobs

Tags

AI Amazon analysis analytics app application Artificial Intelligence BI Big Data business China Cloud Companies company crypto customers Data design development digital engineer environment experience future Google+ government Group health information learning machine learning market mobile news public research security services share skills social social media software strategy technology

Related Events

  • 6th Middle East Banking AI & Analytics Summit 2023 | Riyadh, Saudi Arabia - May 10, 2023
  • Data Science Salon NYC: AI & Machine Learning in Finance & Technology | The Theater Center - December 7, 2022
  • Big Data LDN 2023 | Olympia London - September 20, 2023
More events

Related Online Courses

  • Oracle Cloud Data Management Foundations Workshop
  • Data Science at Scale
  • Statistics with Python
More courses

Footer


Datafloq is the one-stop source for big data, blockchain and artificial intelligence. We offer information, insights and opportunities to drive innovation with emerging technologies.

  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Recent

  • 5 Reasons Why Modern Data Integration Gives You a Competitive Advantage
  • 5 Most Common Database Structures for Small Businesses
  • 6 Ways to Reduce IT Costs Through Observability
  • How is Big Data Analytics Used in Business? These 5 Use Cases Share Valuable Insights
  • How Realistic Are Self-Driving Cars?

Search

Tags

AI Amazon analysis analytics app application Artificial Intelligence BI Big Data business China Cloud Companies company crypto customers Data design development digital engineer environment experience future Google+ government Group health information learning machine learning market mobile news public research security services share skills social social media software strategy technology

Copyright © 2023 Datafloq
HTML Sitemap| Privacy| Terms| Cookies

  • Facebook
  • Twitter
  • LinkedIn
  • WhatsApp

In order to optimize the website and to continuously improve Datafloq, we use cookies. For more information click here.

settings

Dear visitor,
Thank you for visiting Datafloq. If you find our content interesting, please subscribe to our weekly newsletter:

Did you know that you can publish job posts for free on Datafloq? You can start immediately and find the best candidates for free! Click here to get started.

Not Now Subscribe

Thanks for visiting Datafloq
If you enjoyed our content on emerging technologies, why not subscribe to our weekly newsletter to receive the latest news straight into your mailbox?

Subscribe

No thanks

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Marketing cookies

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

Please enable Strictly Necessary Cookies first so that we can save your preferences!