Systems and methods for classification of ambiguous objects
Example implementations include a method, apparatus and computer-readable medium for object classification, including executing a multi-class object classification model (OCM) on an input image depicting an object, wherein the multi-class OCM is configured to output, for each respective class of a plurality of classes, a respective confidence score indicative of a likelihood of the object being of a member the respective class. The implementations further include detecting a plurality of confidence scores outputted by the multi-class OCM that are within a threshold range, wherein classes associated with the plurality of confidence scores are candidate classes of the object. Additionally, the implementations further include executing, on the input image, a single-class OCM for each of the candidate classes and outputting a final class for the object in the input image based on a result of each single-class OCM.
1 . A method for object classification, comprising:
executing, on a computing device, a multi-class object classification model (OCM) on an input image depicting an object, wherein the multi-class OCM is configured to output, for each respective class of a plurality of classes, a respective confidence score indicative of a likelihood of the object being of a member the respective class;
detecting a plurality of confidence scores outputted by the multi-class OCM that are within a threshold range from one another, wherein classes associated with the plurality of confidence scores are candidate classes of the object;
calculating an estimated time for completing execution of the multi-class OCM and a single-class OCM for each of the candidate classes based on computing information of the computing device;
determining that the estimate time does not meet a time constraint;
removing at least one single-class OCM from the execution such that an updated estimated time for completing the execution without the at least one single-class OCM meets the time constraint;
executing, on the input image, a single-class OCM for each of the candidate classes except the at least one single-class OCM removed from the execution, wherein each respective single-class OCM is configured to evaluate membership of the object in a specific candidate class of the candidate classes that the respective single-class OCM is trained to detect; and
outputting a final class for the object in the input image based on a result of each single-class OCM.
2 . The method of claim 1 , wherein the plurality of confidence scores are each greater than a threshold confidence score.
3 . The method of claim 1 , wherein the threshold range is between a highest confidence score of the plurality of confidence scores and a lower confidence score that is a fixed amount below the highest confidence score.
4 . The method of claim 1 , wherein the input image comprises a plurality of objects, further comprising:
generating, by the multi-class OCM, a boundary around each classified object of the plurality of objects in the input image.
5 . The method of claim 4 , further comprising:
extracting an image of the object from the input image based on a generated boundary around the object, wherein each single-class OCM is executed on the image extracted.
6 . The method of claim 1 , wherein the input image is a first image frame of a video stream, further comprising:
detecting the object in a second image frame received subsequent to the first image frame; and
executing, on an image of the object detected in the second image frame, the at least one single-class OCM removed from the execution.
7 . The method of claim 6 , wherein the time constraint is based on a frame rate of the video stream.
8 . An apparatus for object classification, comprising:
a memory; and
a processor coupled with the memory and configured to:
execute, on a computing device, a multi-class object classification model (OCM) on an input image depicting an object, wherein the multi-class OCM is configured to output, for each respective class of a plurality of classes, a respective confidence score indicative of a likelihood of the object being of a member the respective class;
detect a plurality of confidence scores outputted by the multi-class OCM that are within a threshold range from one another, wherein classes associated with the plurality of confidence scores are candidate classes of the object;
calculate an estimated time for completing execution of the multi-class OCM and a single-class OCM for each of the candidate classes based on computing information of the computing device;
determine that the estimate time does not meet a time constraint;
remove at least one single-class OCM from the execution such that an updated estimated time for completing the execution without the at least one single-class OCM meets the time constraint;
execute, on the input image, a single-class OCM for each of the candidate classes except the at least one single-class OCM removed from the execution, wherein each respective single-class OCM is configured to evaluate membership of the object in a specific candidate class of the candidate classes that the respective single-class OCM is trained to detect; and
output a final class for the object in the input image based on a result of each single-class OCM.
9 . The apparatus of claim 8 , wherein the plurality of confidence scores are each greater than a threshold confidence score.
10 . The apparatus of claim 8 , wherein the threshold range is between a highest confidence score of the plurality of confidence scores and a lower confidence score that is a fixed amount below the highest confidence score.
11 . The apparatus of claim 8 , wherein the input image comprises a plurality of objects, wherein the processor is further configured to:
generate, by the multi-class OCM, a boundary around each classified object of the plurality of objects in the input image.
12 . The apparatus of claim 11 , wherein the processor is further configured to:
extract an image of the object from the input image based on a generated boundary around the object, wherein each single-class OCM is executed on the image extracted.
13 . The apparatus of claim 8 , wherein the input image is a first image frame of a video stream, wherein the processor is further configured to:
detect the object in a second image frame received subsequent to the first image frame; and
execute, on an image of the object detected in the second image frame, the at least one single-class OCM removed from the execution.
14 . The apparatus of claim 13 , wherein the time constraint is based on a frame rate of the video stream.
15 . A non-transitory computer-readable medium having instructions stored thereon for object classification, wherein the instructions are executable by a processor to:
execute, on a computing device, a multi-class object classification model (OCM) on an input image depicting an object, wherein the multi-class OCM is configured to output, for each respective class of a plurality of classes, a respective confidence score indicative of a likelihood of the object being of a member the respective class;
detect a plurality of confidence scores outputted by the multi-class OCM that are within a threshold range from one another, wherein classes associated with the plurality of confidence scores are candidate classes of the object;
calculate an estimated time for completing execution of the multi-class OCM and a single-class OCM for each of the candidate classes based on computing information of the computing device;
determine that the estimate time does not meet a time constraint;
remove at least one single-class OCM from the execution such that an updated estimated time for completing the execution without the at least one single-class OCM meets the time constraint;
execute, on the input image, a single-class OCM for each of the candidate classes except the at least one single-class OCM removed from the execution, wherein each respective single-class OCM is configured to evaluate membership of the object in a specific candidate class of the candidate classes that the respective single-class OCM is trained to detect; and
output a final class for the object in the input image based on a result of each single-class OCM.