Skip to content

Fix light setup and stability issues#4

Open
alexbuildstech wants to merge 8 commits intomainfrom
fix/light-stability-cleanups-20260402
Open

Fix light setup and stability issues#4
alexbuildstech wants to merge 8 commits intomainfrom
fix/light-stability-cleanups-20260402

Conversation

@alexbuildstech
Copy link
Copy Markdown
Owner

Summary

  • fix the README run instructions to match the existing .env-based configuration flow
  • clean up lightweight startup/status issues in main_enhanced.py
  • improve existing recall/matching behavior by making label lookups and object label matching less brittle
  • make learning image hashing use a single normalized crop path for consistent deduplication

Test plan

  • Run python -m py_compile *.py
  • Manually verify startup output shows the intended initialization labels
  • Manually test object recall with descriptive labels such as Black Phone vs phone
  • Manually test repeated detections of similarly named objects to confirm matching is more stable

🤖 Generated with Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d096c72ff4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +395 to +396
OR lower(label) LIKE lower(?)
OR lower(label) LIKE lower(?)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid substring LIKE for object recall identity

The new recall query matches labels via LIKE '%...%', which makes identity checks too broad (for example, searching phone can match headphone or microphone). Because recall_object returns the newest matching row, a recent unrelated object can overwrite the intended recall result and produce incorrect location guidance. This should use token/word-boundary matching or a normalized label key instead of raw substring matching.

Useful? React with 👍 / 👎.

Comment on lines 177 to 180
labels_match = (
existing_label_lower == new_label_lower or
existing_label_lower in new_label_lower or
new_label_lower in existing_label_lower
bool(existing_label_tokens & new_label_tokens)
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Tighten object-merge label matching criteria

Using any token intersection as a positive label match is too permissive and can merge different objects that share common words (e.g., phone case and phone charger, or labels that include filler words). Once this condition passes, IoU > 0.1 marks the existing object as verified and suppresses creation of a new object, which drops tracks for distinct nearby objects. Use a stricter label similarity rule before entering the IoU-based merge path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7fad34e20

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +150 to +152
label_tokens = set(label.lower().split())
return [obj for obj in self.objects
if label_tokens & set(obj.label.lower().split())]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize punctuation before token label matching

get_objects_by_label now matches by whitespace token intersection, but split() keeps punctuation/hyphens attached to tokens, so queries like phone will not match labels such as phone, or t-shirt variants. This can cause target lookup in navigation mode to miss the intended object and fall back to the first tracked object, producing incorrect guidance when detector labels include punctuation. Use the same word extraction strategy as mode_controller (e.g., re.findall(r"\w+", ...)) for both query and object labels.

Useful? React with 👍 / 👎.

Also align startup progress labels and on-screen control hints with the current input flow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant