What would be the right approach to measure the space occupied by objects in a lift car? We can have an initial calibration where the camera sees an empty car, so the floor can be detected and measured. Then objects / people can enter the car and we want to measure the space occupied by them. Any suggestions?
Hi @dario.ravarro,
Maybe segmentation could work for that. The inference results below are from our instance segmentation Python example using fast_sam:
You can use the detections’ masks to count the space they occupy in the floor area of the image.
There will also have to be some extra work to calculate some missing pixels - like the ones under the ladder.
You could also use the bounding boxes from object detection if you don’t mind not being too accurate in the area. But for that, you would need to find/train a model with the same ceiling angle as in the elevator.
Hope this helps and good luck with your project!
Is the python example you posted good to run on rpi5 with hailo8L ? or some modifications are needed?
I was thinking of just counting the pixels of the detection masks, but how to address the case of a tall object (like a person) who is near the walls? Just counting the pixels of the mask will be too high because we see the fully body.
The only difference for the rpi5 is that you will need the hef compiled for Hailo8-L
You could focus only on the area of the floor to address this. By identifying the coordinates (xmin
, ymin
, xmax
, ymax
) that correspond to the floor, you can then count only the pixels within this specific region.
I tried to find the proper hef file for 8L, but the one listed here
https://github.com/hailo-ai/hailo_model_zoo/blob/master/docs/public_models/HAILO8L/HAILO8L_zero_shot_instance_segmentation.rst
cannot run on raspberry. So I tried to change the link from
https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v2.12.0/hailo8l/fast_sam_s.hef
to either v2.11.0 or v2.10.0 but they don’t exist in S3 folder.
So where to find fast_sam_s.hef that can run on raspberry with Hailo8L ?
We are working on solving the broken links issue, we apologize for the inconvenience.
You can upgrade the HailoRT version and then you will be able to use all the latest compiled models.
Thank you, I’m trying to upgrade to latest 4.18 but encountered some issues. There’s another topic by me on that