2
$\begingroup$

I want to tackle the problem of detecting similar objects in an image. To illustrate the problem consider this photo of some Lego bricks as my "input":

enter image description here

The detection routine should identify similar objects. So for the given input, it should e.g. identify the following output:

enter image description here

So an object might appear none to multiple times in the input image. For example, there are only two bricks marked with a blue cross, but three bricks marked with a red cross.

It can be assumed that all objects are of similar kind, so e.g. only Lego bricks or a heap of sweets.

My initial idea is to apply a two-phased approach:

  1. Extract all objects in input image.

  2. Compare those extracted objects and find similar ones.

Is this a valid approach or is there already some standard way of solving this kind of problem? Can you give me some pointers how to solve this problem?

$\endgroup$
1
$\begingroup$

Disclaimer: I have never used Siamese networks

I would approach this problem in two steps:

First: train object detector and train it for eligible classes of object, for example using Yolo architecture.

You could use pretrained object detector and finetune it for your classes of objects.

Second: extract a lot of bounding boxes of eligible objects of the same classes from your dataset and train Siamese network on their subimages.

Siamese network output similarity measure between two objects.

Your pipleline would look like:

  1. Run object detetctor

  2. For each two pair of objects of the same class rescale bounding boxes and run Siamese network.

  3. Check if the similarity distance between two objects is less then threshold (tunable hyperparameter)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.