Message Boards Message Boards

How can I detect 'blended' images using a classifier?

Hello all,

I would like to be able to quantify when an image displays a blend of more than one object. Let's say I have trained a CNN on three classes of image: mouse, cat and dog, and I have lots of good images and the classifier is very accurate. But what I want to is be able to send it an image that is a blend of, say, a mouse and dog, and have it return the relative weights of the two detections. So, for example, if my image was the mean of an image of a mouse and a dog, it would return something close to {0.5->mouse, 0.5->dog}. I know that the final layer of a NN can be set to return relative weights rather than a decision, but my concern is that the other parts of a network trained to do classification are already effectively creating strong non-linearities that will try to push the output to one classification or the other. Is this concern valid, and if so, is there a way to construct or constrain the network to return a more linear 'blend' measure?

One possibility I did think of is to actually create a huge number of various blends from my original images, and train the network specifically to predict the three element 'blend weight' vector instead. But that will become rapidly intractable as the number of classes increases.

Gareth Russell

POSTED BY: Gareth Russell
3 Replies
Posted 4 years ago

Hi Gareth,

Have you tried using ImageContents? I don't think the NN it uses is documented though.

POSTED BY: Rohit Namjoshi

I see what you are saying, but ImageContents is targeted at identifying separate objects in a larger image. In my case they would be both overlaid and blended.

Also: I don't actually want to identify cats and dogs (which the network is no doubt already trained on). My target is plant species seem from above, as per an aerial shot of a meadow. It's not a close-up: species would be identified from the 'texture' of an aggregate. The idea is to train the network to identify experimental patches known to be of a single species, but then in a real meadow in which species blend in different proportions, to be able to recover those proportions.

POSTED BY: Gareth Russell

Is there any chance that the texture, or perhaps color, in blended cases would be a linear combination of unblended? If so, it might be possible to estimate for cases of small numbers of possibilities by using linear programming to obtain possible proportions. I realize this is a bit of a long shot. But it could be a back end to a two-step solver, where a classifier is first used to inform as to which few species are present, and linear algebra or linear programming (to enforce nonnegativity, if needed) can then deliver proportions.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract