This example demonstrates how to detect dangerous objects and calculates distance to a human hand (palm).
It uses mobilenet spatial detection netork node to get spatial coordinates of dangerous objects and palm
detection network to detect human palm. Script palm_detection.py handles decoding of
the palm detection network and returns the
bounding box of a detected palm.
Instead of sending the bounding box of the detected palm back to device to theSpatialLocationCalculator, this example
uses function def calc_spatials(self, bbox, depth): to calculate spatial coordinates on the host (using bbox and depth
map). After we have spatial coordiantes of both the dangerous object and the palm, we calculate the spatial distance of
the two and if it's blow the threshold WARNING_DIST, it will output a warning.
Install requirements:
python3 -m pip install -r requirements.txt python3 refer.pyPress 'q' to exit the program.
