Skip to content

Commit 2421e6b

Browse files
saratpoluriCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent db2250f commit 2421e6b

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

controller/src/controller/uuid_manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,9 @@ def _findBestMetricCandidate(self, entities):
539539
"""
540540
Find the best candidate uuid and metric value according to descriptor semantics.
541541
542-
VDMS returns entities sorted ascending by _distance (closest first), so entities[0]
543-
is always the best match.
542+
The best match is selected from the provided entities based on the configured
543+
descriptor metric semantics: higher values are better for higher-is-better
544+
metrics, and lower values are better otherwise.
544545
545546
Structure of entities:
546547
[{'uuid': <UUID>, 'rvid': <TRACKER_ID>, '_distance': <SIMILARITY_SCORE>}, ...]

controller/src/controller/vdms_adapter.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,6 @@ def addEntry(self, uuid, rvid, object_type, reid_vectors, set_name=SCHEMA_NAME,
259259
log.warning("addEntry: No valid vectors to add (all skipped due to dimension mismatch or uninitialized dimensions)")
260260
return
261261

262-
if len(add_query) == 0:
263-
log.warning("addEntry: No valid vectors to add")
264-
return
265-
266262
response, _ = self.sendQuery(add_query, descriptor_blobs) # Flat list of blobs
267263
if response:
268264
success_count = 0

docs/user-guide/other-topics/how-to-enable-reidentification.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ The scene output includes `reid_state` for each tracked object. For canonical st
149149

150150
## Configuration Options
151151

152-
| Parameter | Purpose | Expected Value/Range |
153-
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
154-
| `DEFAULT_SIMILARITY_THRESHOLD` | Minimum Inner Product metric value for a match to be accepted. Higher values are stricter; lower values increase recall (and possible false positives). | Float metric value (e.g., 0.2–0.8) |
155-
| `DEFAULT_MINIMUM_BBOX_AREA` | Minimum bounding box size to consider a valid feature. | Pixel area (e.g., 400–1600) |
156-
| `DEFAULT_MINIMUM_FEATURE_COUNT` | Minimum features needed before querying DB. | Integer (e.g., 5–20) |
157-
| `DEFAULT_MAX_FEATURE_SLICE_SIZE` | Proportion of features stored to improve DB performance. | Float (e.g., 0.1–1.0) |
152+
| Parameter | Purpose | Expected Value/Range |
153+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
154+
| `DEFAULT_SIMILARITY_THRESHOLD` | Match-acceptance threshold. Interpretation depends on `similarity_metric`: for `COSINE` (mapped to VDMS `IP`), higher values are stricter; for `L2`, lower values are stricter. | Float; tune per metric. For `COSINE`/`IP`, values such as `0.2–0.8` may be used. For `L2`, use a distance threshold appropriate to the embedding/model. |
155+
| `DEFAULT_MINIMUM_BBOX_AREA` | Minimum bounding box size to consider a valid feature. | Pixel area (e.g., 400–1600) |
156+
| `DEFAULT_MINIMUM_FEATURE_COUNT` | Minimum features needed before querying DB. | Integer (e.g., 5–20) |
157+
| `DEFAULT_MAX_FEATURE_SLICE_SIZE` | Proportion of features stored to improve DB performance. | Float (e.g., 0.1–1.0) |
158158

159159
To apply changes (include `--profile vdms` if ReID is enabled; see [Docker Compose Profiles](../get-started.md#docker-compose-profiles)):
160160

tests/Makefile.sscape

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ django-integration-unit:
5252
$(MAKE) -Otarget -j $(NPROCS) _$@ SECRETSDIR=$(SECRETSDIR) SUPASS=$(SUPASS) -k
5353
$(eval SECRETSDIR := $(OLDSECRETSDIR))
5454

55+
logic-unit-tests:
56+
$(MAKE) -Otarget -j $(NPROCS) _$@ SUPASS=$(SUPASS) -k
5557
_logic-unit-tests: \
5658
autocamcalib-unit \
5759
geometry-unit \

0 commit comments

Comments
 (0)