2
votes

Assume that I have a method or other neural network to do pattern detection on an image correctly. How should I design a neural network where there are multiple patterns in an image?

Say that in an image, there are X patterns to be detected, what would be the best approach? AFAIK output layer neurons values should be [-1,1]. How would I know if there are X amount of patterns recognised? Does this mean that I have to set a hardcoded limit on how many patterns it can recognise (since number of output neuron is fixed)?

3

3 Answers

0
votes

Here's a suggestion using face detection as an example. This Face Detection link on Github is described to detect multiples pattern (i.e. faces) using a Haar Classifier. If you read under the Implementation section it states that the algorithm uses scaleOption and templateSizeOption parameters (among others) to govern how many faces are detected in an image. It sounds like you should look for features in subspaces or windows of a given image (perhaps even spaces that overlap).

scaleOption - this parameter is used to specify the rate at which the haar features used for face detection will be scaled. A lower scale option means that more faces will be detected, while a higher scale option will perform a faster detection, but may miss some faces from the input image. The default scale value is 1.1, that determines an increase in the features dimension of 10% at each step.

templateSizeOption – it is used to specify the minimal area in which to search for a face. If we want to detect persons from close-up images, the size should be over 40 pixels, otherwise a 25 region pixels (which is the default value ) is enough for detecting a large number of faces.

0
votes

to do this use a hopfild net.at first in equal windows extract your target and save in your the net. then with a simple algoritm search in your image and in any time compare the sim of the net with your target and for any target use separate array to save the result.at the end extract the nearest pattern in each array.you can use some image proccesing in your original image before starting.

0
votes

Yes, this can be done by neural network. I think that most practical solutions would involve applying the neural network to a window which scanned over the image. Multiple hits from the neural network would imply multiple target objects in the image.

Incidentally, neural networks do not have to lie in the range -1 .. 1.