-
Notifications
You must be signed in to change notification settings - Fork 91
0 Areas of Interest
In the first instance, defining areas of interest (AoI) will allow us to determine the boundaries of the space where the object detection will take place, so that all objects that pass through or stay within the AoI will be properly identified and tracked. One of the benefits of defining these areas of interest, is that it will help us to focus and optimize the precision of the detection model into a specific space, reducing the margin of error (false positives, misdetection, etc). With these regions defined we can also trim or mask the original frames in order to reduce the computing times of the inference and future image processing.
In the second instance, we need to define the different areas of interest that might be involved in an intersection. For this, we initially considered defining the following categories: sidewalks, crosswalks, and street. In the particular case of a street, we will be able to differentiate its orientation (North, East, South, West). Taking into account this criteria for defining AoI, we are in a position to define rules for considering dangerous scenarios, such as a car going from the street to the sidewalk while pedestrians are being detected.
Finally, due to some limitations that we have detected regarding the object detection modules, most of them related to external factors such as camera position, camera angle, video’s horizon line, etc, we have decide to give the user the option of manually drawing the desired areas of interest. This manual selection will allow us to customize the AoI according to camera conditions, for each particular case, improving the object detection model functionality.
When running the program with the -show_selection
flag, the user will be prompted to draw on the image a rectangle where to focus the detection, by dragging and dropping with the mouse click.
You can press Del
to start over and F
to finish.
After that the user will be prompted to draw the regions of interest that will add info to the near-misses logic, being:
-
Streets by pressing
S
(default) -
Sidewalks by pressing
W
-
Crosswalks by pressing
Z
By clicking with the left mouse button the user can draw the contours of the regions (with at least 3 points). By pressing Del
you can erase the last point drawn. By pressing N
, the area will be closed and the user will be able to define a new area, of any kind. Particularly, when drawing streets (after pressing N
), the user will be prompted to define an orientation for it (n
, s
, e
, w
). To finish this process and proceed, press F
A new window will pop-up with every area drawn when the process is done.
The functionality of this module is done in file src/drawer.{cpp,hpp}
and in src/main.cpp
under the comment Define regions of interest
In order to handle near misses scenarios, we are adding the possibility to draw an interest area on:
-
Sidewalks
-
Streets
-
Crosswalks
A set of rules is going to be defined by using these areas. For example:
-
A Car MUST NOT be on a sidewalk.
-
No car and pedestrians simultaneously on a crosswalk.
-
A car MUST NOT have 0 velocity on a crosswalk.