Affected Component
Detection (YOLOv8/v9 — services/detection/)
Bug Description
When running the detection demo via make demo or python services/detection/detection.py, the script crashes immediately with an ImportError.
It appears that the project recently migrated zone configurations from hardcoded Python objects to a YAML file, but the detection service was not fully updated to support this change.
Specifically, the following issues occur:
detection.py tries to import get_zones_for_point from services.detection.zones, but this function no longer exists.
detection.py assumes DEFAULT_ZONES is a list of objects with .name and .as_array() attributes, but zones.py now returns a list of dictionaries from the YAML config.
Error Log:
ImportError: cannot import name 'get_zones_for_point' from 'services.detection.zones' (C:\Users\...\Eagle\services\detection\zones.py)
### Steps to Reproduce
1. Clone the repository.
2. Run `make setup` to install all dependencies.
3. Run `make demo` (or execute `python services/detection/detection.py` directly).
4. Observe the `ImportError` crash immediately on startup.
### Expected Behavior
The detection demo should start successfully, open the video stream (webcam or sample video), and display the video feed with bounding boxes and polygon zone overlays without crashing.
### Actual Behavior
The script terminates immediately on startup with the following error:
`ImportError: cannot import name 'get_zones_for_point' from 'services.detection.zones'`
### Python Version
Other (specify in Additional Context)
### Operating System
Windows 11
### Inference Device
CPU
### Error Log / Traceback
```shell
Traceback (most recent call last):
File "C:\Users\dyuti\Projects\Eagle\services\detection\detection.py", line 23, in <module>
from services.detection.zones import DEFAULT_ZONES, get_zones_for_point
ImportError: cannot import name 'get_zones_for_point' from 'services.detection.zones' (C:\Users\dyuti\Projects\Eagle\services\detection\zones.py)
Screenshots or Recordings
No response
Additional Context
Note: I am running Python 3.10.0 on Windows (this version wasn't available in the dropdown). However, this is a structural ImportError due to a missing function from a recent refactor, so the issue is independent of the Python version or OS.
Checklist
Affected Component
Detection (YOLOv8/v9 — services/detection/)
Bug Description
When running the detection demo via
make demoorpython services/detection/detection.py, the script crashes immediately with anImportError.It appears that the project recently migrated zone configurations from hardcoded Python objects to a YAML file, but the detection service was not fully updated to support this change.
Specifically, the following issues occur:
detection.pytries to importget_zones_for_pointfromservices.detection.zones, but this function no longer exists.detection.pyassumesDEFAULT_ZONESis a list of objects with.nameand.as_array()attributes, butzones.pynow returns a list of dictionaries from the YAML config.Error Log:
Screenshots or Recordings
No response
Additional Context
Note: I am running Python 3.10.0 on Windows (this version wasn't available in the dropdown). However, this is a structural
ImportErrordue to a missing function from a recent refactor, so the issue is independent of the Python version or OS.Checklist
mainbranch.