-
Notifications
You must be signed in to change notification settings - Fork 35
[ITEP-83027] Controller with Analytics only mode #884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dmytroye
wants to merge
160
commits into
main
Choose a base branch
from
ITEP-83027/controller-analytics-only-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
160 commits
Select commit
Hold shift + click to select a range
45bbe9d
Initial commit
dmytroye 56e31ed
Add debug logging
dmytroye 77b39b6
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 71381ca
Phyton indent fix
dmytroye 1211d39
Phyton indent fix
dmytroye 070cfbd
Phyton indent fix
dmytroye 36c81e4
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 57c1b6f
Fix SyntaxError
dmytroye 3674cb9
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 22252fe
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 98bfa61
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 4f7333a
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 66570c7
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 1e97534
Apply suggestions from code review
dmytroye 41eaab7
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 8b0abe1
Merge remote-tracking branch 'origin/main' into dmytroye/subscribe-an…
dmytroye 6f570f9
Merge branch 'dmytroye/subscribe-analytics-to-mqtt' of https://github…
dmytroye 6c93325
Add flag to disable tracker in controller
dmytroye 93196d9
Add flag to demo example docker-compose
dmytroye 45d6b91
Indent fix
dmytroye ef542a9
Apply suggestions from code review
dmytroye a82f36a
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 8e19ac7
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye e4d9375
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye c146c78
Dissable tracker flag
dmytroye 38a9bbb
If tracker is enabled, use direct tracker call
dmytroye 5922c7c
Phyton ident
dmytroye 07157cd
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 05b101f
Fix errors on MQTT messeges
dmytroye 45b6dc2
Remove logs and debug changes
dmytroye 4359918
Whitespaces
dmytroye 317fffe
Get frame rate from mqtt
dmytroye 4d131d6
Don't subscribe to camera and sensor topics when --tracker-disabled
dmytroye b1086af
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 01e4e6e
Subscribe to scene/data only when tracke disabled
dmytroye 6a8b258
Delete whitespace
dmytroye 77b5b44
Disable publishing to data/scene when tracke is dissabled
dmytroye 4c0e0fc
Add logging
dmytroye e6302e3
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 5b69ee2
WIP on mqtt messeges
dmytroye 106a768
WIP debug
dmytroye 3e13572
remove field
dmytroye 5f10e07
WIP
dmytroye 25fc819
Remove whitespace
dmytroye e72ca28
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 231fc75
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye c1e3788
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 4cba62e
Change order
dmytroye 73bc1d9
WIP
dmytroye 98ac73a
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 2fd07c5
Fix analytics mode: preserve camera_bounds and ref_camera_frame_rate …
dmytroye 2bab1a7
Remove _normalize_camera_bounds
dmytroye e650bd3
CleanUp
dmytroye 6478510
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye fdf10fd
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye b94a6f7
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 9263330
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye d387d10
Merge branch 'main' into dmytroye/subscribe-analytics-to-mqtt
dmytroye 054d6ed
Remove whitespace
dmytroye 7477fce
Add analytics-only mode flag
dmytroye 6518482
Update docker-compose-dl-streamer-example.yml
dmytroye 0897c79
Revert changes to detections_builder.py
dmytroye fa01d3c
Merge branch 'ITEP-83027/controller-analytics-only-mode' of https://g…
dmytroye 59dd355
Refactor scene.py changes
dmytroye 9d982d2
Review scene_controller.py changes
dmytroye 88c26c2
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 8a5a3bc
Apply suggestions from code review
dmytroye ba89bef
Update controller/src/controller/scene_controller.py
dmytroye 7bac973
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 55910f1
Update controller/src/controller-cmd
dmytroye bcee34a
Using cached tracked objects to outer if condition
dmytroye 51f77db
Remove redundant warnig
dmytroye 4f611c7
Simplify subscribe if condition
dmytroye cbe2197
Remove unnecessary conditions
dmytroye 9670a16
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye e9ed557
Add Analytics Only mode to k8 template
dmytroye ed18889
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 6ec740f
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye b883dc8
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 50d2633
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 6434539
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 4ec6213
Remove frame_rate
dmytroye 37e5759
Use ENV variable CONTROLLER_ENABLE_ANALYTICS_ONLY to enable analytics…
dmytroye 553bd8b
Put if self.analytics_only to the beginning of the function processCa…
dmytroye f9c081a
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 5b65e4d
Add check that each object is a dictionary
dmytroye 996dfa9
Merge branch 'ITEP-83027/controller-analytics-only-mode' of https://g…
dmytroye 3fec81f
Fix indentation
dmytroye ce7918b
Move deserialization check to _deserializeTrackedObjects()
dmytroye efa947c
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 86b233c
Update getTrackedObjects description
dmytroye 0e038ce
Fix indentation
dmytroye 17cd4ef
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
saratpoluri 6297f87
Update make targets with CONTROLLER_ENABLE_ANALYTICS_ONLY env variable
dmytroye 99e6f00
Change K8 chart to use CONTROLLER_ENABLE_ANALYTICS_ONLY
dmytroye 50fe734
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 23b3d23
Update controller/src/controller/scene.py
dmytroye de73b1f
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
scenescapecicd c827c57
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 2fe7bfb
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 4478d34
Update docs
dmytroye 6e2ad63
Add conditional subscription logic based on analytics_only for child …
dmytroye e3c8a03
Add CONTROLLER_ENABLE_ANALYTICS_ONLY to docker-compose-dls-perf.yml i…
dmytroye 0d59c2c
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye b096324
Update subscription logic for ChildSceneController
dmytroye 528679f
Retrack child scene only in default mode
dmytroye ae2c1d5
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 71e6e25
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye e933a83
Add controller/src/controller/controller_mode.py with singleton patte…
dmytroye ef47e77
Fix indent
dmytroye 95082bd
Delete redundant ControllerMode import from chache_manager.py
dmytroye 559a359
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
saratpoluri 9eb771b
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
tdorauintc b739d17
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 4d40407
revert cache_manager.py
dmytroye b1a250f
Remove empty lines
dmytroye 5cbbbf1
Apply suggestions from code review
dmytroye dbbe0ab
Merge branch 'ITEP-83027/controller-analytics-only-mode' of https://g…
dmytroye ea53d79
Update controller/docs/user-guide/get-started.md
dmytroye ec91b6f
Update controller/docs/user-guide/get-started.md
dmytroye bc94202
Remove if statement
dmytroye 9d50953
Prettier
dmytroye a1e006f
Fix indent
dmytroye 724eaaf
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
tdorauintc 8e4068a
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
tdorauintc 39cbc7f
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
tdorauintc d37ac4b
Extend if statement to not load tracker config in analytics only mode
dmytroye af59357
Fix Get Started guide
dmytroye 82228da
Fix Get Started guide
dmytroye 3705ddc
Static namespace mode for Controller's mode
dmytroye 30d5bed
Dummy license fix
dmytroye 66c6ebe
Fix show trails and events processing
dmytroye dc5eae0
Create trail group if it doesn't exist
dmytroye af6c199
Updated method names from snake_case to camelCase
dmytroye e4febe0
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 3c594ed
Add if statement for preserving camera_bounds from deserialized objec…
dmytroye fd3f56f
Fix return indentation
dmytroye 916e450
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye d51063c
Remove emty lines
dmytroye d7dfdfa
Remove emty lines
dmytroye a7e6f04
Adressing hiracracy topics subscriptions
dmytroye 915997a
Consolidated the analytics-only mode check
dmytroye fe0b9ec
Subscribe to DATA_SENSOR in both modes
dmytroye f30b417
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye e217b98
Subscribe for events topic for child scene in both modes
dmytroye d1b8831
Subscribe for events topic for child scene in both modes
dmytroye f0a3e09
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 2c20ab2
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 18e39ce
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 44c67a2
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 1ca926c
Revert child_scene_controller changes
dmytroye 6ef1e27
Revert child_scene_controller changes
dmytroye 87f68c4
Revert child_scene_controller changes
dmytroye 19acafd
Remove child scenes processing
dmytroye a67b75c
Remove redundant preserve camera bounds in Analytics only mode
dmytroye fb7f990
Update docs
dmytroye ddc6f00
Remove ControllerMode from detections_builder.py
dmytroye f34f563
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
dmytroye 343a104
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
scenescapecicd 969d3fb
Merge branch 'main' into ITEP-83027/controller-analytics-only-mode
scenescapecicd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # SPDX-FileCopyrightText: (C) 2026 Intel Corporation | ||
dmytroye marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| from scene_common import log | ||
|
|
||
| class ControllerMode: | ||
dmytroye marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """ | ||
| Static namespace for managing controller's mode. | ||
|
|
||
| Usage: | ||
| # Initialize once at startup | ||
| ControllerMode.initialize(analytics_only=True) | ||
|
|
||
| # Access anywhere in the codebase | ||
| if ControllerMode.isAnalyticsOnly(): | ||
| # analytics-only mode | ||
| else: | ||
| # default mode | ||
| """ | ||
|
|
||
| _initialized = False | ||
| _analytics_only = False | ||
|
|
||
| @classmethod | ||
| def initialize(cls, analytics_only=False): | ||
| """ | ||
| Initialize the controller mode. Should be called once at startup. | ||
|
|
||
| Args: | ||
| analytics_only: If True, controller runs in analytics-only mode | ||
| (no tracking, consumes already-tracked objects) | ||
| """ | ||
| if cls._initialized: | ||
| log.warning("ControllerMode already initialized. Ignoring re-initialization.") | ||
| return | ||
|
|
||
| cls._analytics_only = analytics_only | ||
| cls._initialized = True | ||
|
|
||
| if analytics_only: | ||
| log.info("Controller mode: ANALYTICS-ONLY (tracker disabled)") | ||
| else: | ||
| log.info("Controller mode: DEFAULT (tracker enabled)") | ||
|
|
||
| @classmethod | ||
| def isAnalyticsOnly(cls): | ||
| """ | ||
| Check if controller is running in analytics-only mode. | ||
|
|
||
| Returns: | ||
| bool: True if analytics-only mode is enabled, False otherwise | ||
| """ | ||
| if not cls._initialized: | ||
| log.warning("ControllerMode not initialized. Defaulting to default mode.") | ||
| return False | ||
| return cls._analytics_only | ||
|
|
||
| @classmethod | ||
| def isInitialized(cls): | ||
| """ | ||
| Check if the controller mode has been initialized. | ||
|
|
||
| Returns: | ||
| bool: True if initialized, False otherwise | ||
| """ | ||
| return cls._initialized | ||
|
|
||
| @classmethod | ||
| def reset(cls): | ||
| """ | ||
| Reset the singleton state. | ||
| """ | ||
| cls._initialized = False | ||
| cls._analytics_only = False | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.