Image analysis server, object counting method using image analysis server, and object counting system
An image analysis server, an object counting method using the image analysis server, and an object counting system are provided, in which the object counting method using the image analysis server includes, by a user terminal, inputting an image including one or more objects, by an image analysis server, forming a plurality of boxes for each of the objects, and keeping only the number of boxes corresponding to the objects and deleting the other boxes of the plurality of boxes, and by the image analysis server, counting the number of the remaining boxes and transmitting the corresponding number of the boxes to the user terminal.
1 . A method performed by a computing device, the method comprising:
receiving, by the computing device, an image including one or more objects;
generating a plurality of boxes associated with the one or more objects and corresponding to different portions of the image by:
providing, as input to an object recognition algorithm implemented via an artificial neural network, the image; and
receiving, as output from the object recognition algorithm, indications of the plurality of boxes;
based on determining that at least a portion of the plurality of boxes in the output overlap:
keeping one or more first boxes, of the plurality of boxes, corresponding to the one or more objects; and
deleting one or more second boxes, of the plurality of boxes, corresponding to the one or more objects by:
based on determining that at least one of the one or more second boxes at least partially overlaps with at least one of the one or more first boxes, identifying a portion of the at least one of the one or more second boxes that does not overlap the at least one of the one or more first boxes;
determining a ratio of the portion to a total area of the at least one of the one or more second boxes; and
based on the ratio being less than a coefficient, deleting the at least one of the one or more second boxes, wherein the coefficient is based on an expected shape of the one or more objects; and
transmitting, to a user terminal, information indicating a count of the one or more first boxes.
2 . The method according to claim 1 , wherein the generating the plurality of boxes comprises calculating a convolutional feature map for the image.
3 . The method according to claim 1 , wherein a quantity of the one or more first boxes corresponds to a predicted quantity of the one or more objects.
4 . The method according to claim 1 , wherein the keeping the one or more first boxes comprises keeping only one box for each object of the one or more objects.
5 . The method according to claim 1 , wherein the keeping the one or more first boxes and the deleting the one or more second boxes comprises:
setting a box of the plurality of boxes as a reference box; and
determining, based on a set of boxes overlapping the reference box, whether to keep or delete the reference box.
6 . The method according to claim 1 , wherein the object recognition algorithm implemented via the artificial neural network is a RetinaNet algorithm.
7 . The method according to claim 1 , wherein the deleting the one or more second boxes comprises executing a non-maximum suppression (NMS) algorithm.
8 . The method according to claim 5 , wherein the coefficient is further based on a size of the one or more objects.
9 . An image analysis server comprising:
one or more processors; and
memory storing instructions that, when executed by the one or more processors, cause the image analysis server to:
receive, from a user terminal, an image including one or more objects;
generate a plurality of boxes associated with the one or more objects corresponding to different portions of the image by:
providing, as input to an object recognition algorithm implemented via an artificial neural network, the image; and
receiving, as output from the object recognition algorithm, indications of the plurality of boxes;
based on determining that at least a portion of the plurality of boxes in the output overlap:
keep one or more first boxes, of the plurality of boxes, corresponding to the one or more objects; and
delete one or more second boxes, of the plurality of boxes, corresponding to the one or more objects by:
based on determining that at least one of the one or more second boxes at least partially overlaps with at least one of the one or more first boxes, identifying a portion of the at least one of the one or more second boxes that does not overlap the at least one of the one or more first boxes;
determining a ratio of the portion to a total area of the at least one of the one or more second boxes; and
based on the ratio being less than a coefficient, deleting the at least one of the one or more second boxes, wherein the coefficient is based on an expected shape of the one or more objects; and
transmit, to the user terminal, information indicating a count of the one or more first boxes.
10 . The image analysis server according to claim 9 , wherein the instructions, when executed by the one or more processors, cause the image analysis server to generate the plurality of boxes by calculating a convolutional feature map for the image.
11 . The image analysis server according to claim 9 , wherein a quantity of the one or more first boxes corresponds to a predicted quantity of the one or more objects.
12 . The image analysis server according to claim 9 , wherein the instructions, when executed by the one or more processors, cause the image analysis server to keep the one or more first boxes by causing the image analysis server to keep only one box for each object of the one or more objects.
13 . The image analysis server according to claim 9 , wherein the instructions, when executed by the one or more processors, cause the image analysis server to keep the one or more first boxes and delete the one or more second boxes by causing the image analysis server to:
set a box of the plurality of boxes as a reference box; and
determine, based on a set of boxes overlapping the reference box, whether to keep or delete the reference box.
14 . The image analysis server according to claim 9 , wherein the object recognition algorithm implemented via the artificial neural network is a RetinaNet algorithm.
15 . The image analysis server according to claim 9 , wherein the instructions, when executed by the one or more processors, cause the image analysis server to delete the one or more second boxes by causing the image analysis server to execute a non-maximum suppression (NMS) algorithm.
16 . The image analysis server according to claim 13 , wherein the coefficient is further based on a size of the one or more objects.
17 . One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors of a computing device, cause the computing device to:
receive, from a user terminal, an image including one or more objects;
generate a plurality of boxes associated with the one or more objects corresponding to different portions of the image by:
providing, as input to an object recognition algorithm implemented via an artificial neural network, the image; and
receiving, as output from the object recognition algorithm, indications of the plurality of boxes;
based on determining that at least a portion of the plurality of boxes in the output overlap:
keep one or more first boxes, of the plurality of boxes, corresponding to the one or more objects; and
delete one or more second boxes, of the plurality of boxes, corresponding to the one or more objects by:
based on determining that at least one of the one or more second boxes at least partially overlaps with at least one of the one or more first boxes, identifying a portion of the at least one of the one or more second boxes that does not overlap the at least one of the one or more first boxes;
determining a ratio of the portion to a total area of the at least one of the one or more second boxes; and
based on the ratio being less than a coefficient, deleting the at least one of the one or more second boxes, wherein the coefficient is based on an expected shape of the one or more objects; and
transmit, to the user terminal, information indicating a count of the one or more first boxes.
18 . The one or more non-transitory computer-readable media of claim 17 , wherein the instructions, when executed by the one or more processors, cause the computing device to generate the plurality of boxes by calculating a convolutional feature map for the image.
19 . The one or more non-transitory computer-readable media of claim 17 , wherein a quantity of the one or more first boxes corresponds to a predicted quantity of the one or more objects.
20 . The one or more non-transitory computer-readable media of claim 17 , wherein the instructions, when executed by the one or more processors, cause the computing device to keep the one or more first boxes by causing the computing device to keep only one box for each object of the one or more objects.