Skip to content

Fixed issue #1074#1075

Merged
alexlin2 merged 1 commit intodevfrom
moondream_hosted_fix
Jan 20, 2026
Merged

Fixed issue #1074#1075
alexlin2 merged 1 commit intodevfrom
moondream_hosted_fix

Conversation

@alexlin2
Copy link
Contributor

Fixed issue #1074

@alexlin2 alexlin2 requested a review from a team January 20, 2026 15:48
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile Overview

Greptile Summary

Refactored MoondreamHostedVlModel.point() to query_points() to match the base VlModel interface and return properly typed ImageDetections2D[Detection2DPoint] instead of raw pixel coordinates.

Key changes:

  • Renamed method from point() to query_points() to align with base class interface defined in dimos/models/vl/base.py:294-342
  • Changed return type from list[tuple[float, float]] to ImageDetections2D[Detection2DPoint]
  • Updated implementation to create Detection2DPoint objects with all required fields (x, y, name, ts, image, track_id)
  • Added validation via is_valid() check before appending detections
  • Added Detection2DPoint import
  • Added test coverage for MoondreamHostedVlModel in both bbox and point detection test cases

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are a straightforward refactoring to fix an interface mismatch. The new implementation follows the exact pattern used in the local MoondreamVlModel.query_points() method (lines 181-220), properly converts normalized coordinates to pixels, creates typed detection objects with validation, and adds test coverage. No logic bugs, security issues, or breaking changes detected.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/models/vl/moondream_hosted.py Refactored point method to query_points to match base class interface and return ImageDetections2D[Detection2DPoint], added Detection2DPoint import

Sequence Diagram

sequenceDiagram
    participant Test as test_vlm.py
    participant Model as MoondreamHostedVlModel
    participant Client as Moondream API Client
    participant Image as Image/Detection Types
    
    Test->>Model: query_points(image, query)
    Model->>Model: _to_pil_image(image)
    Model->>Client: point(pil_image, query)
    Client-->>Model: {"points": [{"x": 0.5, "y": 0.3}, ...]}
    
    loop For each point
        Model->>Model: Convert normalized coords to pixels
        Model->>Image: Create Detection2DPoint(x, y, name, ts, image, track_id)
        Model->>Image: detection.is_valid()
        alt Valid detection
            Model->>Image: image_detections.detections.append(detection)
        end
    end
    
    Model-->>Test: ImageDetections2D[Detection2DPoint]
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@alexlin2 alexlin2 merged commit f330d3a into dev Jan 20, 2026
14 checks passed
@alexlin2 alexlin2 deleted the moondream_hosted_fix branch January 20, 2026 16:06
spomichter added a commit that referenced this pull request Jan 23, 2026
… Unitree Go2 Navigation & Exploration Beta

Pre-Release v0.0.8: Unitree Go2 Navigation & Exploration Beta, Transport Updates, Documentation updates, Rerun fixes, Person follow, Readme updates

## What's Changed
* Small docs clarification about stream getters by @leshy in #1043
* Fix split view on wide monitors by @jeff-hykin in #1048
* Docs: Install & Develop  by @jeff-hykin in #1022
* Add uv to nix and fix resulting problems by @jeff-hykin in #1021
* v0.0.8 by @paul-nechifor in #1050
* Style changes in docs by @paul-nechifor in #1051
* Revert "Add uv to nix and fix resulting problems" by @leshy in #1053
* Transport benchmarks + Raw ros transport by @leshy in #1038
* feat: default to rerun-web and auto-open browser on startup (browser … by @Nabla7 in #1019
* bbox detections visual check by @leshy in #1017
* fix: only auto-open browser for rerun-web viewer backend by @Nabla7 in #1066
* move slow tests to integration by @paul-nechifor in #1063
* Streamline transport start/stop methods by @Kaweees in #1062
* Person follow skill with EdgeTAM by @paul-nechifor in #1042
* fix: increase costmap floor z_offset to avoid z-fighting by @Nabla7 in #1073
* Fixed issue #1074 by @alexlin2 in #1075
* ROS transports initial by @leshy in #1057
* Fix System Config Values for LCM on MacOS and Refactor by @jeff-hykin in #1065
* SHM Transport basic fixes by @leshy in #1041
* commented out Mem Transport test case by @leshy in #1077
* Docs/advanced streams update 2 by @leshy in #1078
* Fix more tests by @paul-nechifor in #1071
* feat: navigation docker updates from bona_local_dev by @baishibona in #1081
* Fix missing dependencies by @Kaweees in #1085
* Release readme fixes by @spomichter in #1076

## New Contributors
* @baishibona made their first contribution in #1081

**Full Changelog**: v0.0.7...v0.0.8
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.

2 participants