Product detection device, product detection system, product detection method, and recording medium
A product detection device is provided with: an image acquisition unit; a binarization unit; and a detection unit. The image acquisition unit acquires an image of shelves for displaying products. The binarization unit binarizes a region in the image into a product region where products are imaged and a non-product region where things other than the products are imaged. The detection unit detects the display state of products displayed on the shelves in accordance with the width of the binarized product region and the width of a gap region adjacent to the products.
1 . A product detection device comprising:
a memory storing instructions; and
one or more processors configured to execute the instructions to:
acquire an image of a shelf on which a product is displayed;
binarize a region in the image into a product region in which the product appears and a non-product region in which a thing other than the product appears;
perform weighting on pixels of the product region and the non-product region based on their position in the image, wherein the weighting assigns higher weight values to pixels located at higher positions in a height direction of the shelf, which are located toward a rear of the shelf, compared to pixels located at lower positions in the height direction of the shelf, which are pixels located at a front of the shelf, in a display of the product; and
detect a state of display of the product displayed on the shelf according to a width of the product region that was subjected to the weighting and a width of a gap region adjacent to the product that was subjected to the weighting.
2 . The product detection device according to claim 1 , wherein
the one or more processors are further configured to execute the instructions to:
detect an anomaly of the display of the product when a ratio of the width of the gap region to the width of the product region is a predetermined value or more.
3 . The product detection device according to claim 2 , wherein
the one or more processors are further configured to execute the instructions to:
generate an approximate curve according to the width of the product region and the width of the gap region; and
detect the anomaly of the display of the product when at least part of the approximate curve falls below a second predetermined threshold value due to the ratio being equal to or more than the predetermined value.
4 . The product detection device according to claim 1 , wherein
the width of the product region includes the width of the product region associated with the product imaged from a plurality of angles.
5 . The product detection device according to claim 1 , wherein
the one or more processors are further configured to execute the instructions to:
store one or more models learned, for each shelf shape, for detecting the state of display of the product displayed on the shelf; and
perform the detection using the one or more stored models.
6 . The product detection device according to claim 1 , wherein
the one or more processors are further configured to execute the instructions to:
notify an external terminal of a result of the detection when detecting an anomaly in the display state of the product.
7 . A product detection system comprising:
the product detection device according to claim 1 ;
a camera that captures the image to transmit the captured image to the product detection device; and
a terminal that receives a notification related to the detection from the product detection device.
8 . A product detection method comprising:
acquiring an image of a shelf on which a product is displayed;
binarizing a region in the image into a product region in which the product appears and a non-product region in which a thing other than the product appears;
performing weighting on pixels of the product region and the non-product region based on their position in the image, wherein the weighting assigns higher weight values to pixels located at higher positions in a height direction of the shelf, which are located toward a rear of the shelf, compared to pixels located at lower positions in the height direction of the shelf, which are pixels located at a front of the shelf, in a display of the product; and
detecting a state of display of the product displayed on the shelf according to a width of the product region that was subjected to the weighting and a width of a gap region adjacent to the product that was subjected to the weighting.
9 . The product detection method according to claim 8 wherein
the detecting includes detecting an anomaly of the display of the product when a ratio of the width of the gap region to the width of the product region is a predetermined value or more.
10 . The product detection method according to claim 9 , further comprising:
generating an approximate curve according to the width of the product region and the width of the gap region; and
detecting the anomaly of the display of the product when at least part of the approximate curve falls below a second predetermined threshold value due to the ratio being equal to or more than the predetermined value.
11 . The product detection method according to claim 8 , wherein
the width of the product region includes the width of the product region associated with the product imaged from a plurality of angles.
12 . The product detection method according to claim 8 , wherein
the detecting includes performing the detection using one or more stored models learned, for each shelf shape, for detecting the state of display of the product displayed on the shelf.
13 . A recording medium storing a product detection program for causing a computer to execute:
acquiring an image of a shelf on which a product is displayed;
binarizing a region in the image into a product region in which the product appears and a non-product region in which a thing other than the product appears;
performing weighting on pixels of the product region and the non-product region based on their position in the image, wherein the weighting assigns higher weight values to pixels located at higher positions in a height direction of the shelf, which are located toward a rear of the shelf, compared to pixels located at lower positions in the height direction of the shelf, which are pixels located at a front of the shelf, in a display of the product; and
detecting a state of display of the product displayed on the shelf according to a width of the product region that was subjected to the weighting and a width of a gap region adjacent to the product that was subjected to the weighting.
14 . The recording medium according to claim 13 , wherein
the detecting includes detecting an anomaly of the display of the product when a ratio of the width of the gap region to the width of the product region is a predetermined value or more.
15 . The recording medium according to claim 14 , the executing further comprising:
generating an approximate curve according to the width of the product region and the width of the gap region; and
detecting the anomaly of the display of the product when at least part of the approximate curve falls below a second predetermined threshold value due to the ratio being equal to or more than the predetermined value.
16 . The recording medium according to claim 13 , wherein
the width of the product region includes the width of the product region associated with the product imaged from a plurality of angles.
17 . The recording medium according to claim 13 , wherein
the detecting includes performing the detection using one or more stored models learned, for each shelf shape, for detecting the state of display of the product displayed on the shelf.