• DepthAI
  • Optional Detection area on mobile SSD model

Hi guys, I'm working on this GitHub project https://github.com/luxonis/depthai-experiments/tree/master/gen2-cumulative-object-counting and wonder How can I add the detection area by hand.
By default it gets the entire frame as a detection area and detects objects within that frame, I want to make some changes and it should get a small detection area in which the user inserts coordinates by hand like in this image below:

This is completely another project and I should implement similar logic to this GitHub project.
As you can see in the image above it's only detecting people within the drawn rectangle, How can I do this in that project?
Thank you for your answer 😁

  • erik replied to this.

    Hi erik
    Thanks for the reply, I checked the video and it's cool, but in our case, it'll be streaming to a web browser and should get the coordinates from the backend side, We also implemented an admin panel for entering the coordinates to detect.
    As it's my first project working on depthai, I'm not sure where should I put those coordinates for detection, If you can help me with that I'd be very glad bro.

    Here is the code bro if you have time please check it out and give recommendations please: https://github.com/Fakhrillo/Cumulative_object_counting

    • erik replied to this.

      Hi Fakhrullo ,
      I'd suggest checking the code I linked to - it's creating ImageManipConfig (on host) and it applies the setCropRect() so ImageManip (which feeds imgs into NN) will crop images. See code here.

        erik Thank you very much, I'll try that out and notify you with the results 😊Thank you