Method and apparatus with object detection
An electronic device generates a feature map from an input image to perform object detection, classifies one or more objects included in the input image and determines one or more object regions including the one or more objects based on the feature map, classifies an ROI included in at least a portion of the objects and determines the ROI included in the input image based on the feature map, displays on the input image an indicator identifying a first object region of a first object where the ROI is determined and a feature point of a first ROI of the first object, and displays on the input image an indicator identifying a second object region of a second object where the ROI is not determined and a feature point of the second object region, to perform post-processing differently according to whether an ROI is determined in an object.
1 . A processor-implemented image processing method, the method comprising:
performing an inference operation including object detection by:
generating a feature map from an input image;
classifying one or more objects included in the input image based on the feature map,
determining, in the input image, a first object region comprising a first object based on the generated feature map; and
determining whether the first object region includes a region of interest (ROI) based on the generated feature map, wherein a same anchor box is used for determining the first object region and for determining whether the first object region includes the ROI;
controlling, based on classifying the first object as a target object, a displaying of an indicator, depending on whether the first object region includes the ROI or not, including:
displaying a first indicator within the ROI that identifies a feature point of the ROI in response to the first object region including the ROI; and
displaying a second indicator within the first object region that identifies a feature point of the first object region in response to the first object region not including the ROI, wherein the first indicator and the second indicator are different, and
controlling, based on classifying a second object as not corresponding to the target object, a displaying a second object region for the second object.
2 . The method of claim 1 , wherein the input image is a red, green, and blue (RGB) image.
3 . The method of claim 1 , wherein the feature map is generated based on ShuffleNet V2.
4 . The method of claim 1 , wherein:
the target object is at least a portion of a person, and
the ROI is a region corresponding to a face of the person.
5 . The method of claim 4 , wherein:
coordinates of the first indicator correspond to coordinates of a nose of the face of the person.
6 . The method of claim 1 , wherein the feature point of the ROI and the feature point of the first object region are preset coordinates.
7 . The method of claim 1 , wherein the first object region and the ROI are determined based on bounding box regression.
8 . A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the image processing method of claim 1 .
9 . The method of claim 1 , wherein:
coordinates of the second indicator correspond to coordinates of a center of mass of the second object region.
10 . A device, comprising:
one or more processors, configured to:
perform an inference operation including object detection by:
generating a feature map from an input image;
classifying one or more objects included in the input image based on the feature map;
determining, in the input image, a first object region comprising a first object based on the generated feature map; and
determining whether the first object region includes a region of interest (ROI) based on the generated feature map, wherein a same anchor box is used for determining the object region and for determining whether the object region includes the ROI;
control, based on classifying the first object as a target object, a displaying of an indicator, depending on whether the object region includes the ROI or not, including:
displaying a first indicator within the ROI that identifies a feature point of the ROI in response to the first object region including the ROI; and
displaying a second indicator within the first object region that identifies a feature point of the first object region in response to the first object region not including the ROI, wherein the first indicator and the second indicator are different, and
control, based on classifying a second object as not corresponding to the target object, a displaying a second object region for the second object.
11 . The device of claim 10 , further comprising a memory, storing instructions that, when executed by the processor, configures the processor to perform the inference operation and control the displaying of the indicator.
12 . The device of claim 10 , further comprising a capturing device configured to capture the input image.
13 . The device of claim 10 , wherein the input image is a red, green, and blue (RGB) image.
14 . The device of claim 10 , wherein the feature map is generated based on ShuffleNet V2.
15 . The device of claim 10 , wherein:
the target object is at least a portion of a person, and
the ROI is a region corresponding to a face of the person.
16 . The device of claim 15 , wherein:
coordinates of the first indicator correspond to coordinates of a nose of the face of the person.
17 . The electronic device of claim 10 , wherein the feature point of the ROI and the feature point of the first object region are preset coordinates.
18 . The device of claim 10 , wherein:
coordinates of the second indicator correspond to coordinates of a center of mass of the second object region.