neuromeka-vfm 0.1.3__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. neuromeka_vfm-0.1.4/PKG-INFO +186 -0
  2. neuromeka_vfm-0.1.4/README.md +141 -0
  3. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/pyproject.toml +2 -3
  4. neuromeka_vfm-0.1.4/src/neuromeka_vfm.egg-info/PKG-INFO +186 -0
  5. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm.egg-info/requires.txt +0 -1
  6. neuromeka_vfm-0.1.3/PKG-INFO +0 -159
  7. neuromeka_vfm-0.1.3/README.md +0 -113
  8. neuromeka_vfm-0.1.3/src/neuromeka_vfm.egg-info/PKG-INFO +0 -159
  9. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/LICENSE +0 -0
  10. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/setup.cfg +0 -0
  11. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/__init__.py +0 -0
  12. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/compression.py +0 -0
  13. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/examples/__init__.py +0 -0
  14. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/examples/pose_demo.py +0 -0
  15. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/pickle_client.py +0 -0
  16. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/pose_estimation.py +0 -0
  17. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/segmentation.py +0 -0
  18. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm/upload_mesh.py +0 -0
  19. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm.egg-info/SOURCES.txt +0 -0
  20. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm.egg-info/dependency_links.txt +0 -0
  21. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm.egg-info/entry_points.txt +0 -0
  22. {neuromeka_vfm-0.1.3 → neuromeka_vfm-0.1.4}/src/neuromeka_vfm.egg-info/top_level.txt +0 -0
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuromeka_vfm
3
+ Version: 0.1.4
4
+ Summary: Client utilities for Neuromeka VFM FoundationPose RPC (upload meshes, call server)
5
+ Author: Neuromeka
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Neuromeka Co., Ltd.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Development Status :: 3 - Alpha
29
+ Classifier: Intended Audience :: Developers
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: Programming Language :: Python :: 3.8
33
+ Classifier: Programming Language :: Python :: 3.9
34
+ Classifier: Programming Language :: Python :: 3.10
35
+ Classifier: Programming Language :: Python :: 3.11
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Requires-Python: >=3.8
38
+ Description-Content-Type: text/markdown
39
+ License-File: LICENSE
40
+ Requires-Dist: numpy
41
+ Requires-Dist: pyzmq
42
+ Requires-Dist: paramiko
43
+ Requires-Dist: av
44
+ Dynamic: license-file
45
+
46
+ # neuromeka_vfm
47
+
48
+ 클라이언트 PC에서 Segmentation (SAM2, Grounding DINO), Pose Estimation (NVIDIA FoundationPose) 서버(RPC, ZeroMQ)와 통신하고, SSH/SFTP로 호스트에 mesh를 업로드하는 간단한 유틸 패키지입니다.
49
+
50
+ - Website: http://www.neuromeka.com
51
+ - Source code: https://github.com/neuromeka-robotics/neuromeka_vfm
52
+ - PyPI package: https://pypi.org/project/neuromeka_vfm/
53
+ - Documents: https://docs.neuromeka.com
54
+
55
+ ## Web UI (VFM Tester)를 통해 사용 가능
56
+
57
+ - VFM Tester (Web UI): https://gitlab.com/neuromeka-group/nrmkq/nrmk_vfm_tester
58
+
59
+
60
+ ## Installation
61
+ ```bash
62
+ pip install neuromeka_vfm
63
+ ```
64
+
65
+ ## Python API (예제로 보는 사용법)
66
+
67
+ * 내 PC: 어플리케이션을 구현하고 이 패키지 (neuromeka_vfm)이 설치된 PC
68
+ * 서버PC (Host): Segmentation, Pose Estimation 도커 서버가 설치된 PC. 내 PC에 도커를 설치할 경우 localhost 사용.
69
+
70
+ ### Segmentation
71
+ ```python
72
+ from neuromeka_vfm import Segmentation
73
+
74
+ seg = Segmentation(
75
+ hostname="192.168.10.63",
76
+ port=5432,
77
+ compression_strategy="png", # none | png | jpeg | h264
78
+ )
79
+
80
+ # Image Prompt를 이용한 등록
81
+ seg.add_image_prompt("drug_box", ref_rgb)
82
+ seg.register_first_frame(frame=first_rgb,
83
+ prompt="drug_box", # ID str
84
+ use_image_prompt=True)
85
+
86
+ # Text Prompt를 이용한 등록
87
+ seg.register_first_frame(frame=first_rgb,
88
+ prompt="box .", # Text prompt (끝에 띄어쓰기 . 필수)
89
+ use_image_prompt=False)
90
+
91
+ # 등록된 mask에 대한 SAM2 tracking
92
+ masks = seg.get_next(next_rgb)
93
+
94
+
95
+ seg.close()
96
+ ```
97
+
98
+ ### Pose Estimation
99
+
100
+ **Mesh 파일 업로드**: 등록/인식하고자 하는 mesh 파일 (stl)을 호스트PC의 '/opt/meshes/' 경로에 업로드 (직접 SSH 통해 파일을 옮겨도 됨)
101
+ ```python
102
+ from neuromeka_vfm import upload_mesh
103
+ upload_mesh(
104
+ host="192.168.10.63",
105
+ user="user",
106
+ password="pass",
107
+ local="mesh/my_mesh.stl", # 내 PC mesh 경로
108
+ remote="/opt/meshes/my_mesh.stl", # 호스트PC mesh 경로 (도커 볼륨마운트)
109
+ )
110
+ ```
111
+
112
+ 초기화
113
+ ```python
114
+ from neuromeka_vfm import PoseEstimation
115
+
116
+ pose = PoseEstimation(host="192.168.10.72", port=5557)
117
+
118
+ pose.init(
119
+ mesh_path="/app/modules/foundation_pose/mesh/my_mesh.stl",
120
+ apply_scale=1.0,
121
+ track_refine_iter=3,
122
+ min_n_views=40,
123
+ inplane_step=60
124
+ )
125
+ ```
126
+ - mesh_path: 사용할 물체 메시 파일(STL/OBJ 등) 경로. 없으면 초기화 실패.
127
+ - apply_scale: 메시를 로드한 뒤 전체를 배율 조정하는 스케일 값. 단위 없는 곱셈 계수.
128
+ - STL 모델이 미터 단위라면 1.0 (스케일 없음)
129
+ - STL 모델이 센티미터 단위라면 0.01 (1 cm → 0.01 m)
130
+ - STL 모델이 밀리미터 단위라면 0.001 (1 mm → 0.001 m)
131
+ - force_apply_color: True일 때 메시에 단색 텍스처를 강제로 입힘. 메시가 색상을 안 가졌을 때 시각화 안정성을 위해 사용.
132
+ - apply_color: force_apply_color가 True일 때 적용할 RGB 색상값(0~255) 튜플.
133
+ - est_refine_iter: 초기 등록(register) 단계에서 포즈를 반복 정련하는 횟수. 값이 클수록 정확도 ↑, 연산 시간 ↑.
134
+ - track_refine_iter: 추적(track) 단계에서 한 프레임당 포즈 정련 반복 횟수.
135
+ - min_n_views: 초기 뷰 샘플링 시 생성할 최소 카메라 뷰 수(회전 후보 수에 영향).
136
+ - inplane_step: in-plane 회전 샘플링 간격(도 단위). 값이 작을수록 더 많은 회전 후보를 생성.
137
+
138
+
139
+ 인식 및 추적
140
+ ```python
141
+ # 초기 등록 (iteration 생략 시 서버 기본값, check_vram=True로 VRAM 사전 체크)
142
+ register_resp = pose.register(rgb=rgb0, depth=depth0, mask=mask0, K=cam_K, check_vram=True)
143
+
144
+ # 추적 (bbox_xywh로 탐색 범위 제한 가능)
145
+ track_resp = pose.track(rgb=rgb1, depth=depth1, K=cam_K, bbox_xywh=bbox_xywh)
146
+ pose.close()
147
+ ```
148
+ - cam_K: camera intrinsic
149
+ - RGB resolution이 크거나, min_n_views 값이 크거나, inplane_step이 작을 경우 GPU VRAM 초과 에러 발생.
150
+ - register check_vram=True 일 경우 VRAM 초과 사전 검사하여 shutdown 방지.
151
+
152
+
153
+ ## VFM (Vision Foundation Model) latency benchmark
154
+ 로컬 서버 구동 시 측정. 빈칸은 아직 미측정 항목입니다.
155
+
156
+ **RTX 5060**
157
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
158
+ | --- | --- | --- | --- | --- | --- |
159
+ | Grounding DINO | text (human . cup .) | 0.86 | 0.35 | 0.50 | 0.52 |
160
+ | DINOv2 | image prompt | 0.85 | 0.49 | 0.65 | 0.63 |
161
+ | SAM2 | - | | | | |
162
+ | FoundationPose registration | - | | | | |
163
+ | FoundationPose track | - | | | | |
164
+
165
+ **RTX 5090**
166
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
167
+ | --- | --- | --- | --- | --- | --- |
168
+ | Grounding DINO | text (human . cup .) | | | | |
169
+ | DINOv2 | image prompt | | | | |
170
+ | SAM2 | - | | | | |
171
+ | FoundationPose registration | - | 0.4 | - | | |
172
+ | FoundationPose track | - | 0.03 | | | |
173
+
174
+ **Jetson Orin**
175
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
176
+ | --- | --- | --- | --- | --- | --- |
177
+ | Grounding DINO | text (human . cup .) | | | | |
178
+ | DINOv2 | image prompt | | | | |
179
+ | SAM2 | - | | | | |
180
+ | FoundationPose registration | - | 0.4 | - | | |
181
+ | FoundationPose track | - | 0.03 | | | |
182
+
183
+ ## 릴리스 노트
184
+ - 0.1.2: Segmentation 응답 성공 판정 개선(`result`/`success`/`status` 모두 지원), image prompt 등록/사용 오류 수정, PoseEstimation `register`에 `check_vram` 옵션 반영.
185
+ - 0.1.1: PoseEstimation/Segmentation에서 리소스 정리 개선, iteration 미전달 시 서버 기본값 사용, pose 데모 예제 추가.
186
+ - 0.1.0: 초기 공개 버전. FoundationPose RPC 클라이언트, 실시간 세그멘테이션 클라이언트, SSH 기반 mesh 업로드 CLI/API 포함.
@@ -0,0 +1,141 @@
1
+ # neuromeka_vfm
2
+
3
+ 클라이언트 PC에서 Segmentation (SAM2, Grounding DINO), Pose Estimation (NVIDIA FoundationPose) 서버(RPC, ZeroMQ)와 통신하고, SSH/SFTP로 호스트에 mesh를 업로드하는 간단한 유틸 패키지입니다.
4
+
5
+ - Website: http://www.neuromeka.com
6
+ - Source code: https://github.com/neuromeka-robotics/neuromeka_vfm
7
+ - PyPI package: https://pypi.org/project/neuromeka_vfm/
8
+ - Documents: https://docs.neuromeka.com
9
+
10
+ ## Web UI (VFM Tester)를 통해 사용 가능
11
+
12
+ - VFM Tester (Web UI): https://gitlab.com/neuromeka-group/nrmkq/nrmk_vfm_tester
13
+
14
+
15
+ ## Installation
16
+ ```bash
17
+ pip install neuromeka_vfm
18
+ ```
19
+
20
+ ## Python API (예제로 보는 사용법)
21
+
22
+ * 내 PC: 어플리케이션을 구현하고 이 패키지 (neuromeka_vfm)이 설치된 PC
23
+ * 서버PC (Host): Segmentation, Pose Estimation 도커 서버가 설치된 PC. 내 PC에 도커를 설치할 경우 localhost 사용.
24
+
25
+ ### Segmentation
26
+ ```python
27
+ from neuromeka_vfm import Segmentation
28
+
29
+ seg = Segmentation(
30
+ hostname="192.168.10.63",
31
+ port=5432,
32
+ compression_strategy="png", # none | png | jpeg | h264
33
+ )
34
+
35
+ # Image Prompt를 이용한 등록
36
+ seg.add_image_prompt("drug_box", ref_rgb)
37
+ seg.register_first_frame(frame=first_rgb,
38
+ prompt="drug_box", # ID str
39
+ use_image_prompt=True)
40
+
41
+ # Text Prompt를 이용한 등록
42
+ seg.register_first_frame(frame=first_rgb,
43
+ prompt="box .", # Text prompt (끝에 띄어쓰기 . 필수)
44
+ use_image_prompt=False)
45
+
46
+ # 등록된 mask에 대한 SAM2 tracking
47
+ masks = seg.get_next(next_rgb)
48
+
49
+
50
+ seg.close()
51
+ ```
52
+
53
+ ### Pose Estimation
54
+
55
+ **Mesh 파일 업로드**: 등록/인식하고자 하는 mesh 파일 (stl)을 호스트PC의 '/opt/meshes/' 경로에 업로드 (직접 SSH 통해 파일을 옮겨도 됨)
56
+ ```python
57
+ from neuromeka_vfm import upload_mesh
58
+ upload_mesh(
59
+ host="192.168.10.63",
60
+ user="user",
61
+ password="pass",
62
+ local="mesh/my_mesh.stl", # 내 PC mesh 경로
63
+ remote="/opt/meshes/my_mesh.stl", # 호스트PC mesh 경로 (도커 볼륨마운트)
64
+ )
65
+ ```
66
+
67
+ 초기화
68
+ ```python
69
+ from neuromeka_vfm import PoseEstimation
70
+
71
+ pose = PoseEstimation(host="192.168.10.72", port=5557)
72
+
73
+ pose.init(
74
+ mesh_path="/app/modules/foundation_pose/mesh/my_mesh.stl",
75
+ apply_scale=1.0,
76
+ track_refine_iter=3,
77
+ min_n_views=40,
78
+ inplane_step=60
79
+ )
80
+ ```
81
+ - mesh_path: 사용할 물체 메시 파일(STL/OBJ 등) 경로. 없으면 초기화 실패.
82
+ - apply_scale: 메시를 로드한 뒤 전체를 배율 조정하는 스케일 값. 단위 없는 곱셈 계수.
83
+ - STL 모델이 미터 단위라면 1.0 (스케일 없음)
84
+ - STL 모델이 센티미터 단위라면 0.01 (1 cm → 0.01 m)
85
+ - STL 모델이 밀리미터 단위라면 0.001 (1 mm → 0.001 m)
86
+ - force_apply_color: True일 때 메시에 단색 텍스처를 강제로 입힘. 메시가 색상을 안 가졌을 때 시각화 안정성을 위해 사용.
87
+ - apply_color: force_apply_color가 True일 때 적용할 RGB 색상값(0~255) 튜플.
88
+ - est_refine_iter: 초기 등록(register) 단계에서 포즈를 반복 정련하는 횟수. 값이 클수록 정확도 ↑, 연산 시간 ↑.
89
+ - track_refine_iter: 추적(track) 단계에서 한 프레임당 포즈 정련 반복 횟수.
90
+ - min_n_views: 초기 뷰 샘플링 시 생성할 최소 카메라 뷰 수(회전 후보 수에 영향).
91
+ - inplane_step: in-plane 회전 샘플링 간격(도 단위). 값이 작을수록 더 많은 회전 후보를 생성.
92
+
93
+
94
+ 인식 및 추적
95
+ ```python
96
+ # 초기 등록 (iteration 생략 시 서버 기본값, check_vram=True로 VRAM 사전 체크)
97
+ register_resp = pose.register(rgb=rgb0, depth=depth0, mask=mask0, K=cam_K, check_vram=True)
98
+
99
+ # 추적 (bbox_xywh로 탐색 범위 제한 가능)
100
+ track_resp = pose.track(rgb=rgb1, depth=depth1, K=cam_K, bbox_xywh=bbox_xywh)
101
+ pose.close()
102
+ ```
103
+ - cam_K: camera intrinsic
104
+ - RGB resolution이 크거나, min_n_views 값이 크거나, inplane_step이 작을 경우 GPU VRAM 초과 에러 발생.
105
+ - register check_vram=True 일 경우 VRAM 초과 사전 검사하여 shutdown 방지.
106
+
107
+
108
+ ## VFM (Vision Foundation Model) latency benchmark
109
+ 로컬 서버 구동 시 측정. 빈칸은 아직 미측정 항목입니다.
110
+
111
+ **RTX 5060**
112
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
113
+ | --- | --- | --- | --- | --- | --- |
114
+ | Grounding DINO | text (human . cup .) | 0.86 | 0.35 | 0.50 | 0.52 |
115
+ | DINOv2 | image prompt | 0.85 | 0.49 | 0.65 | 0.63 |
116
+ | SAM2 | - | | | | |
117
+ | FoundationPose registration | - | | | | |
118
+ | FoundationPose track | - | | | | |
119
+
120
+ **RTX 5090**
121
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
122
+ | --- | --- | --- | --- | --- | --- |
123
+ | Grounding DINO | text (human . cup .) | | | | |
124
+ | DINOv2 | image prompt | | | | |
125
+ | SAM2 | - | | | | |
126
+ | FoundationPose registration | - | 0.4 | - | | |
127
+ | FoundationPose track | - | 0.03 | | | |
128
+
129
+ **Jetson Orin**
130
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
131
+ | --- | --- | --- | --- | --- | --- |
132
+ | Grounding DINO | text (human . cup .) | | | | |
133
+ | DINOv2 | image prompt | | | | |
134
+ | SAM2 | - | | | | |
135
+ | FoundationPose registration | - | 0.4 | - | | |
136
+ | FoundationPose track | - | 0.03 | | | |
137
+
138
+ ## 릴리스 노트
139
+ - 0.1.2: Segmentation 응답 성공 판정 개선(`result`/`success`/`status` 모두 지원), image prompt 등록/사용 오류 수정, PoseEstimation `register`에 `check_vram` 옵션 반영.
140
+ - 0.1.1: PoseEstimation/Segmentation에서 리소스 정리 개선, iteration 미전달 시 서버 기본값 사용, pose 데모 예제 추가.
141
+ - 0.1.0: 초기 공개 버전. FoundationPose RPC 클라이언트, 실시간 세그멘테이션 클라이언트, SSH 기반 mesh 업로드 CLI/API 포함.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "neuromeka_vfm"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "Client utilities for Neuromeka VFM FoundationPose RPC (upload meshes, call server)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -13,8 +13,7 @@ dependencies = [
13
13
  "numpy",
14
14
  "pyzmq",
15
15
  "paramiko",
16
- "av",
17
- "opencv-python-headless",
16
+ "av",
18
17
  ]
19
18
  authors = [{name = "Neuromeka"}]
20
19
  classifiers = [
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuromeka_vfm
3
+ Version: 0.1.4
4
+ Summary: Client utilities for Neuromeka VFM FoundationPose RPC (upload meshes, call server)
5
+ Author: Neuromeka
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Neuromeka Co., Ltd.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Development Status :: 3 - Alpha
29
+ Classifier: Intended Audience :: Developers
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: Programming Language :: Python :: 3.8
33
+ Classifier: Programming Language :: Python :: 3.9
34
+ Classifier: Programming Language :: Python :: 3.10
35
+ Classifier: Programming Language :: Python :: 3.11
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Requires-Python: >=3.8
38
+ Description-Content-Type: text/markdown
39
+ License-File: LICENSE
40
+ Requires-Dist: numpy
41
+ Requires-Dist: pyzmq
42
+ Requires-Dist: paramiko
43
+ Requires-Dist: av
44
+ Dynamic: license-file
45
+
46
+ # neuromeka_vfm
47
+
48
+ 클라이언트 PC에서 Segmentation (SAM2, Grounding DINO), Pose Estimation (NVIDIA FoundationPose) 서버(RPC, ZeroMQ)와 통신하고, SSH/SFTP로 호스트에 mesh를 업로드하는 간단한 유틸 패키지입니다.
49
+
50
+ - Website: http://www.neuromeka.com
51
+ - Source code: https://github.com/neuromeka-robotics/neuromeka_vfm
52
+ - PyPI package: https://pypi.org/project/neuromeka_vfm/
53
+ - Documents: https://docs.neuromeka.com
54
+
55
+ ## Web UI (VFM Tester)를 통해 사용 가능
56
+
57
+ - VFM Tester (Web UI): https://gitlab.com/neuromeka-group/nrmkq/nrmk_vfm_tester
58
+
59
+
60
+ ## Installation
61
+ ```bash
62
+ pip install neuromeka_vfm
63
+ ```
64
+
65
+ ## Python API (예제로 보는 사용법)
66
+
67
+ * 내 PC: 어플리케이션을 구현하고 이 패키지 (neuromeka_vfm)이 설치된 PC
68
+ * 서버PC (Host): Segmentation, Pose Estimation 도커 서버가 설치된 PC. 내 PC에 도커를 설치할 경우 localhost 사용.
69
+
70
+ ### Segmentation
71
+ ```python
72
+ from neuromeka_vfm import Segmentation
73
+
74
+ seg = Segmentation(
75
+ hostname="192.168.10.63",
76
+ port=5432,
77
+ compression_strategy="png", # none | png | jpeg | h264
78
+ )
79
+
80
+ # Image Prompt를 이용한 등록
81
+ seg.add_image_prompt("drug_box", ref_rgb)
82
+ seg.register_first_frame(frame=first_rgb,
83
+ prompt="drug_box", # ID str
84
+ use_image_prompt=True)
85
+
86
+ # Text Prompt를 이용한 등록
87
+ seg.register_first_frame(frame=first_rgb,
88
+ prompt="box .", # Text prompt (끝에 띄어쓰기 . 필수)
89
+ use_image_prompt=False)
90
+
91
+ # 등록된 mask에 대한 SAM2 tracking
92
+ masks = seg.get_next(next_rgb)
93
+
94
+
95
+ seg.close()
96
+ ```
97
+
98
+ ### Pose Estimation
99
+
100
+ **Mesh 파일 업로드**: 등록/인식하고자 하는 mesh 파일 (stl)을 호스트PC의 '/opt/meshes/' 경로에 업로드 (직접 SSH 통해 파일을 옮겨도 됨)
101
+ ```python
102
+ from neuromeka_vfm import upload_mesh
103
+ upload_mesh(
104
+ host="192.168.10.63",
105
+ user="user",
106
+ password="pass",
107
+ local="mesh/my_mesh.stl", # 내 PC mesh 경로
108
+ remote="/opt/meshes/my_mesh.stl", # 호스트PC mesh 경로 (도커 볼륨마운트)
109
+ )
110
+ ```
111
+
112
+ 초기화
113
+ ```python
114
+ from neuromeka_vfm import PoseEstimation
115
+
116
+ pose = PoseEstimation(host="192.168.10.72", port=5557)
117
+
118
+ pose.init(
119
+ mesh_path="/app/modules/foundation_pose/mesh/my_mesh.stl",
120
+ apply_scale=1.0,
121
+ track_refine_iter=3,
122
+ min_n_views=40,
123
+ inplane_step=60
124
+ )
125
+ ```
126
+ - mesh_path: 사용할 물체 메시 파일(STL/OBJ 등) 경로. 없으면 초기화 실패.
127
+ - apply_scale: 메시를 로드한 뒤 전체를 배율 조정하는 스케일 값. 단위 없는 곱셈 계수.
128
+ - STL 모델이 미터 단위라면 1.0 (스케일 없음)
129
+ - STL 모델이 센티미터 단위라면 0.01 (1 cm → 0.01 m)
130
+ - STL 모델이 밀리미터 단위라면 0.001 (1 mm → 0.001 m)
131
+ - force_apply_color: True일 때 메시에 단색 텍스처를 강제로 입힘. 메시가 색상을 안 가졌을 때 시각화 안정성을 위해 사용.
132
+ - apply_color: force_apply_color가 True일 때 적용할 RGB 색상값(0~255) 튜플.
133
+ - est_refine_iter: 초기 등록(register) 단계에서 포즈를 반복 정련하는 횟수. 값이 클수록 정확도 ↑, 연산 시간 ↑.
134
+ - track_refine_iter: 추적(track) 단계에서 한 프레임당 포즈 정련 반복 횟수.
135
+ - min_n_views: 초기 뷰 샘플링 시 생성할 최소 카메라 뷰 수(회전 후보 수에 영향).
136
+ - inplane_step: in-plane 회전 샘플링 간격(도 단위). 값이 작을수록 더 많은 회전 후보를 생성.
137
+
138
+
139
+ 인식 및 추적
140
+ ```python
141
+ # 초기 등록 (iteration 생략 시 서버 기본값, check_vram=True로 VRAM 사전 체크)
142
+ register_resp = pose.register(rgb=rgb0, depth=depth0, mask=mask0, K=cam_K, check_vram=True)
143
+
144
+ # 추적 (bbox_xywh로 탐색 범위 제한 가능)
145
+ track_resp = pose.track(rgb=rgb1, depth=depth1, K=cam_K, bbox_xywh=bbox_xywh)
146
+ pose.close()
147
+ ```
148
+ - cam_K: camera intrinsic
149
+ - RGB resolution이 크거나, min_n_views 값이 크거나, inplane_step이 작을 경우 GPU VRAM 초과 에러 발생.
150
+ - register check_vram=True 일 경우 VRAM 초과 사전 검사하여 shutdown 방지.
151
+
152
+
153
+ ## VFM (Vision Foundation Model) latency benchmark
154
+ 로컬 서버 구동 시 측정. 빈칸은 아직 미측정 항목입니다.
155
+
156
+ **RTX 5060**
157
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
158
+ | --- | --- | --- | --- | --- | --- |
159
+ | Grounding DINO | text (human . cup .) | 0.86 | 0.35 | 0.50 | 0.52 |
160
+ | DINOv2 | image prompt | 0.85 | 0.49 | 0.65 | 0.63 |
161
+ | SAM2 | - | | | | |
162
+ | FoundationPose registration | - | | | | |
163
+ | FoundationPose track | - | | | | |
164
+
165
+ **RTX 5090**
166
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
167
+ | --- | --- | --- | --- | --- | --- |
168
+ | Grounding DINO | text (human . cup .) | | | | |
169
+ | DINOv2 | image prompt | | | | |
170
+ | SAM2 | - | | | | |
171
+ | FoundationPose registration | - | 0.4 | - | | |
172
+ | FoundationPose track | - | 0.03 | | | |
173
+
174
+ **Jetson Orin**
175
+ | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
176
+ | --- | --- | --- | --- | --- | --- |
177
+ | Grounding DINO | text (human . cup .) | | | | |
178
+ | DINOv2 | image prompt | | | | |
179
+ | SAM2 | - | | | | |
180
+ | FoundationPose registration | - | 0.4 | - | | |
181
+ | FoundationPose track | - | 0.03 | | | |
182
+
183
+ ## 릴리스 노트
184
+ - 0.1.2: Segmentation 응답 성공 판정 개선(`result`/`success`/`status` 모두 지원), image prompt 등록/사용 오류 수정, PoseEstimation `register`에 `check_vram` 옵션 반영.
185
+ - 0.1.1: PoseEstimation/Segmentation에서 리소스 정리 개선, iteration 미전달 시 서버 기본값 사용, pose 데모 예제 추가.
186
+ - 0.1.0: 초기 공개 버전. FoundationPose RPC 클라이언트, 실시간 세그멘테이션 클라이언트, SSH 기반 mesh 업로드 CLI/API 포함.
@@ -2,4 +2,3 @@ numpy
2
2
  pyzmq
3
3
  paramiko
4
4
  av
5
- opencv-python-headless
@@ -1,159 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: neuromeka_vfm
3
- Version: 0.1.3
4
- Summary: Client utilities for Neuromeka VFM FoundationPose RPC (upload meshes, call server)
5
- Author: Neuromeka
6
- License: MIT License
7
-
8
- Copyright (c) 2025 Neuromeka Co., Ltd.
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in all
18
- copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
28
- Classifier: Development Status :: 3 - Alpha
29
- Classifier: Intended Audience :: Developers
30
- Classifier: License :: OSI Approved :: MIT License
31
- Classifier: Programming Language :: Python :: 3
32
- Classifier: Programming Language :: Python :: 3.8
33
- Classifier: Programming Language :: Python :: 3.9
34
- Classifier: Programming Language :: Python :: 3.10
35
- Classifier: Programming Language :: Python :: 3.11
36
- Classifier: Programming Language :: Python :: 3.12
37
- Requires-Python: >=3.8
38
- Description-Content-Type: text/markdown
39
- License-File: LICENSE
40
- Requires-Dist: numpy
41
- Requires-Dist: pyzmq
42
- Requires-Dist: paramiko
43
- Requires-Dist: av
44
- Requires-Dist: opencv-python-headless
45
- Dynamic: license-file
46
-
47
- # neuromeka_vfm
48
-
49
- 클라이언트 PC에서 Segmentation (SAM2, Grounding DINO), Pose Estimation (NVIDIA FoundationPose) 서버(RPC, ZeroMQ)와 통신하고, SSH/SFTP로 호스트에 mesh를 업로드하는 간단한 유틸 패키지입니다.
50
-
51
- - Website: http://www.neuromeka.com
52
- - Source code: https://github.com/neuromeka-robotics/neuromeka_vfm
53
- - PyPI package: https://pypi.org/project/neuromeka_vfm/
54
- - Documents: https://docs.neuromeka.com
55
-
56
- ## VFM (Vision Foundation Model) latency benchmark
57
- 로컬 서버 구동 시 측정. 빈칸은 아직 미측정 항목입니다.
58
-
59
- **RTX 5060**
60
- | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
61
- | --- | --- | --- | --- | --- | --- |
62
- | Grounding DINO | text (human . cup .) | 0.86 | 0.35 | 0.50 | 0.52 |
63
- | DINOv2 | image prompt | 0.85 | 0.49 | 0.65 | 0.63 |
64
- | SAM2 | - | | | | |
65
- | FoundationPose registration | - | | | | |
66
- | FoundationPose track | - | | | | |
67
-
68
- **RTX 5090**
69
- | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
70
- | --- | --- | --- | --- | --- | --- |
71
- | Grounding DINO | text (human . cup .) | | | | |
72
- | DINOv2 | image prompt | | | | |
73
- | SAM2 | - | | | | |
74
- | FoundationPose registration | - | | | | |
75
- | FoundationPose track | - | | | | |
76
-
77
-
78
- ## Installation
79
- ```bash
80
- pip install neuromeka_vfm
81
- ```
82
-
83
- ## 사용 예
84
- ### Python API
85
- ```python
86
- from neuromeka_vfm import PoseEstimation, upload_mesh
87
- # (옵션) Realtime segmentation client도 포함됩니다.
88
-
89
- # 1) 서버로 mesh 업로드 (호스트 경로는 컨테이너에 -v로 마운트된 곳)
90
- upload_mesh(
91
- host="192.168.10.72",
92
- user="user",
93
- password="pass", # 또는 key="~/.ssh/id_rsa"
94
- local="mesh/123.stl",
95
- remote="/home/user/meshes/123.stl",
96
- )
97
-
98
- # 2) PoseEstimation 클라이언트
99
- pose = PoseEstimation(host="192.168.10.72", port=5557)
100
- pose.init(mesh_path="/app/modules/foundation_pose/mesh/123.stl")
101
- # ...
102
- pose.close()
103
-
104
- # 3) Realtime segmentation client (예)
105
- from neuromeka_vfm import Segmentation
106
- seg = Segmentation(
107
- hostname="192.168.10.63",
108
- port=5432, # 해당 도커/서버 포트
109
- compression_strategy="png", # none | png | jpeg | h264
110
- benchmark=False,
111
- )
112
- # seg.register_first_frame(...)
113
- # seg.get_next(...)
114
- # seg.reset()
115
- # seg.finish()
116
- ```
117
-
118
- ## 주의
119
- - `remote`는 **호스트** 경로입니다. 컨테이너 실행 시 `-v /home/user/meshes:/app/modules/foundation_pose/mesh`처럼 마운트하면, 업로드 직후 컨테이너에서 접근 가능합니다.
120
- - RPC 포트(기본 5557)는 서버가 `-p 5557:5557`으로 노출되어 있어야 합니다.
121
-
122
-
123
-
124
- ## API 레퍼런스 (Python)
125
-
126
- ### PoseEstimation (FoundationPose RPC)
127
- - `PoseEstimation(host=None, port=None)`
128
- - `host`: FoundationPose 도커 서버가 구동 중인 PC의 IP.
129
- - `port`: 5557
130
- - `init(mesh_path, apply_scale=1.0, force_apply_color=False, apply_color=(160,160,160), est_refine_iter=10, track_refine_iter=3, min_n_views=40, inplane_step=60)`: 서버에 메쉬 등록 및 초기화.
131
- - `register(rgb, depth, mask, K, iteration=None, check_vram=True)`: 첫 프레임 등록. `iteration`을 생략하면 서버 기본 반복 횟수를 사용하며, `check_vram=False`로 두면 GPU 메모리 사전 체크를 건너뜁니다.
132
- - `track(rgb, depth, K, iteration=None, bbox_xywh=None)`: 추적/갱신. `bbox_xywh` 제공 시 해당 영역으로 탐색 범위를 좁힙니다.
133
- - `reset()`: 세션 리셋.
134
- - `reset_object()`: 캐시된 메쉬로 서버 측 `reset_object` 재호출.
135
- - `close()`: ZeroMQ 소켓/컨텍스트 정리 (사용 후 필수 호출 권장).
136
-
137
- ### Segmentation (실시간 SAM2/GroundingDINO)
138
- - `Segmentation(hostname, port, compression_strategy="none", benchmark=False)`:
139
- - `compression_strategy`: `none|png|jpeg|h264`
140
- - `hostname`: 세그멘테이션 도커 서버가 구동 중인 PC의 IP.
141
- - `add_image_prompt(object_name, object_image)`: 이미지 프롬프트 등록.
142
- - `register_first_frame(frame, prompt, use_image_prompt=False) -> bool`: 첫 프레임 등록, 성공 시 `True` 반환. `use_image_prompt=True`면 모든 이름을 사전에 `add_image_prompt`로 등록해야 합니다(누락 시 `ValueError`).
143
- - `get_next(frame) -> dict[obj_id, mask] | None`: 다음 프레임 세그멘테이션/트래킹 결과.
144
- - `switch_compression_strategy(compression_strategy)`: 런타임 압축 방식 교체.
145
- - `reset()`: 내부 상태 및 벤치마크 타이머 리셋.
146
- - `finish()`: 로컬 상태 초기화.
147
- - `close()`: ZeroMQ 소켓/컨텍스트 정리 (사용 후 필수 호출 권장).
148
-
149
- ### 업로드 CLI/API
150
- - `upload_mesh(host, user, port=22, password=None, key=None, local=None, remote=None)`: SSH/SFTP로 메쉬 전송, 비밀번호 또는 키 중 하나 필수.
151
- - CLI: `neuromeka-upload-mesh --host ... --user ... (--password ... | --key ...) --local ... --remote ...`
152
-
153
- ### 예제
154
- - 실시간 Pose + Segmentation 데모: `python -m neuromeka_vfm.examples.pose_demo` (RealSense 필요, 서버 실행 상태에서 사용).
155
-
156
-
157
- ## 릴리스 노트
158
- - 0.1.1: PoseEstimation/Segmentation에서 리소스 정리 개선, iteration 미전달 시 서버 기본값 사용, pose 데모 예제 추가.
159
- - 0.1.0: 초기 공개 버전. FoundationPose RPC 클라이언트, 실시간 세그멘테이션 클라이언트, SSH 기반 mesh 업로드 CLI/API 포함.
@@ -1,113 +0,0 @@
1
- # neuromeka_vfm
2
-
3
- 클라이언트 PC에서 Segmentation (SAM2, Grounding DINO), Pose Estimation (NVIDIA FoundationPose) 서버(RPC, ZeroMQ)와 통신하고, SSH/SFTP로 호스트에 mesh를 업로드하는 간단한 유틸 패키지입니다.
4
-
5
- - Website: http://www.neuromeka.com
6
- - Source code: https://github.com/neuromeka-robotics/neuromeka_vfm
7
- - PyPI package: https://pypi.org/project/neuromeka_vfm/
8
- - Documents: https://docs.neuromeka.com
9
-
10
- ## VFM (Vision Foundation Model) latency benchmark
11
- 로컬 서버 구동 시 측정. 빈칸은 아직 미측정 항목입니다.
12
-
13
- **RTX 5060**
14
- | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
15
- | --- | --- | --- | --- | --- | --- |
16
- | Grounding DINO | text (human . cup .) | 0.86 | 0.35 | 0.50 | 0.52 |
17
- | DINOv2 | image prompt | 0.85 | 0.49 | 0.65 | 0.63 |
18
- | SAM2 | - | | | | |
19
- | FoundationPose registration | - | | | | |
20
- | FoundationPose track | - | | | | |
21
-
22
- **RTX 5090**
23
- | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
24
- | --- | --- | --- | --- | --- | --- |
25
- | Grounding DINO | text (human . cup .) | | | | |
26
- | DINOv2 | image prompt | | | | |
27
- | SAM2 | - | | | | |
28
- | FoundationPose registration | - | | | | |
29
- | FoundationPose track | - | | | | |
30
-
31
-
32
- ## Installation
33
- ```bash
34
- pip install neuromeka_vfm
35
- ```
36
-
37
- ## 사용 예
38
- ### Python API
39
- ```python
40
- from neuromeka_vfm import PoseEstimation, upload_mesh
41
- # (옵션) Realtime segmentation client도 포함됩니다.
42
-
43
- # 1) 서버로 mesh 업로드 (호스트 경로는 컨테이너에 -v로 마운트된 곳)
44
- upload_mesh(
45
- host="192.168.10.72",
46
- user="user",
47
- password="pass", # 또는 key="~/.ssh/id_rsa"
48
- local="mesh/123.stl",
49
- remote="/home/user/meshes/123.stl",
50
- )
51
-
52
- # 2) PoseEstimation 클라이언트
53
- pose = PoseEstimation(host="192.168.10.72", port=5557)
54
- pose.init(mesh_path="/app/modules/foundation_pose/mesh/123.stl")
55
- # ...
56
- pose.close()
57
-
58
- # 3) Realtime segmentation client (예)
59
- from neuromeka_vfm import Segmentation
60
- seg = Segmentation(
61
- hostname="192.168.10.63",
62
- port=5432, # 해당 도커/서버 포트
63
- compression_strategy="png", # none | png | jpeg | h264
64
- benchmark=False,
65
- )
66
- # seg.register_first_frame(...)
67
- # seg.get_next(...)
68
- # seg.reset()
69
- # seg.finish()
70
- ```
71
-
72
- ## 주의
73
- - `remote`는 **호스트** 경로입니다. 컨테이너 실행 시 `-v /home/user/meshes:/app/modules/foundation_pose/mesh`처럼 마운트하면, 업로드 직후 컨테이너에서 접근 가능합니다.
74
- - RPC 포트(기본 5557)는 서버가 `-p 5557:5557`으로 노출되어 있어야 합니다.
75
-
76
-
77
-
78
- ## API 레퍼런스 (Python)
79
-
80
- ### PoseEstimation (FoundationPose RPC)
81
- - `PoseEstimation(host=None, port=None)`
82
- - `host`: FoundationPose 도커 서버가 구동 중인 PC의 IP.
83
- - `port`: 5557
84
- - `init(mesh_path, apply_scale=1.0, force_apply_color=False, apply_color=(160,160,160), est_refine_iter=10, track_refine_iter=3, min_n_views=40, inplane_step=60)`: 서버에 메쉬 등록 및 초기화.
85
- - `register(rgb, depth, mask, K, iteration=None, check_vram=True)`: 첫 프레임 등록. `iteration`을 생략하면 서버 기본 반복 횟수를 사용하며, `check_vram=False`로 두면 GPU 메모리 사전 체크를 건너뜁니다.
86
- - `track(rgb, depth, K, iteration=None, bbox_xywh=None)`: 추적/갱신. `bbox_xywh` 제공 시 해당 영역으로 탐색 범위를 좁힙니다.
87
- - `reset()`: 세션 리셋.
88
- - `reset_object()`: 캐시된 메쉬로 서버 측 `reset_object` 재호출.
89
- - `close()`: ZeroMQ 소켓/컨텍스트 정리 (사용 후 필수 호출 권장).
90
-
91
- ### Segmentation (실시간 SAM2/GroundingDINO)
92
- - `Segmentation(hostname, port, compression_strategy="none", benchmark=False)`:
93
- - `compression_strategy`: `none|png|jpeg|h264`
94
- - `hostname`: 세그멘테이션 도커 서버가 구동 중인 PC의 IP.
95
- - `add_image_prompt(object_name, object_image)`: 이미지 프롬프트 등록.
96
- - `register_first_frame(frame, prompt, use_image_prompt=False) -> bool`: 첫 프레임 등록, 성공 시 `True` 반환. `use_image_prompt=True`면 모든 이름을 사전에 `add_image_prompt`로 등록해야 합니다(누락 시 `ValueError`).
97
- - `get_next(frame) -> dict[obj_id, mask] | None`: 다음 프레임 세그멘테이션/트래킹 결과.
98
- - `switch_compression_strategy(compression_strategy)`: 런타임 압축 방식 교체.
99
- - `reset()`: 내부 상태 및 벤치마크 타이머 리셋.
100
- - `finish()`: 로컬 상태 초기화.
101
- - `close()`: ZeroMQ 소켓/컨텍스트 정리 (사용 후 필수 호출 권장).
102
-
103
- ### 업로드 CLI/API
104
- - `upload_mesh(host, user, port=22, password=None, key=None, local=None, remote=None)`: SSH/SFTP로 메쉬 전송, 비밀번호 또는 키 중 하나 필수.
105
- - CLI: `neuromeka-upload-mesh --host ... --user ... (--password ... | --key ...) --local ... --remote ...`
106
-
107
- ### 예제
108
- - 실시간 Pose + Segmentation 데모: `python -m neuromeka_vfm.examples.pose_demo` (RealSense 필요, 서버 실행 상태에서 사용).
109
-
110
-
111
- ## 릴리스 노트
112
- - 0.1.1: PoseEstimation/Segmentation에서 리소스 정리 개선, iteration 미전달 시 서버 기본값 사용, pose 데모 예제 추가.
113
- - 0.1.0: 초기 공개 버전. FoundationPose RPC 클라이언트, 실시간 세그멘테이션 클라이언트, SSH 기반 mesh 업로드 CLI/API 포함.
@@ -1,159 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: neuromeka_vfm
3
- Version: 0.1.3
4
- Summary: Client utilities for Neuromeka VFM FoundationPose RPC (upload meshes, call server)
5
- Author: Neuromeka
6
- License: MIT License
7
-
8
- Copyright (c) 2025 Neuromeka Co., Ltd.
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in all
18
- copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
28
- Classifier: Development Status :: 3 - Alpha
29
- Classifier: Intended Audience :: Developers
30
- Classifier: License :: OSI Approved :: MIT License
31
- Classifier: Programming Language :: Python :: 3
32
- Classifier: Programming Language :: Python :: 3.8
33
- Classifier: Programming Language :: Python :: 3.9
34
- Classifier: Programming Language :: Python :: 3.10
35
- Classifier: Programming Language :: Python :: 3.11
36
- Classifier: Programming Language :: Python :: 3.12
37
- Requires-Python: >=3.8
38
- Description-Content-Type: text/markdown
39
- License-File: LICENSE
40
- Requires-Dist: numpy
41
- Requires-Dist: pyzmq
42
- Requires-Dist: paramiko
43
- Requires-Dist: av
44
- Requires-Dist: opencv-python-headless
45
- Dynamic: license-file
46
-
47
- # neuromeka_vfm
48
-
49
- 클라이언트 PC에서 Segmentation (SAM2, Grounding DINO), Pose Estimation (NVIDIA FoundationPose) 서버(RPC, ZeroMQ)와 통신하고, SSH/SFTP로 호스트에 mesh를 업로드하는 간단한 유틸 패키지입니다.
50
-
51
- - Website: http://www.neuromeka.com
52
- - Source code: https://github.com/neuromeka-robotics/neuromeka_vfm
53
- - PyPI package: https://pypi.org/project/neuromeka_vfm/
54
- - Documents: https://docs.neuromeka.com
55
-
56
- ## VFM (Vision Foundation Model) latency benchmark
57
- 로컬 서버 구동 시 측정. 빈칸은 아직 미측정 항목입니다.
58
-
59
- **RTX 5060**
60
- | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
61
- | --- | --- | --- | --- | --- | --- |
62
- | Grounding DINO | text (human . cup .) | 0.86 | 0.35 | 0.50 | 0.52 |
63
- | DINOv2 | image prompt | 0.85 | 0.49 | 0.65 | 0.63 |
64
- | SAM2 | - | | | | |
65
- | FoundationPose registration | - | | | | |
66
- | FoundationPose track | - | | | | |
67
-
68
- **RTX 5090**
69
- | Task | Prompt | None (s) | JPEG (s) | PNG (s) | h264 (s) |
70
- | --- | --- | --- | --- | --- | --- |
71
- | Grounding DINO | text (human . cup .) | | | | |
72
- | DINOv2 | image prompt | | | | |
73
- | SAM2 | - | | | | |
74
- | FoundationPose registration | - | | | | |
75
- | FoundationPose track | - | | | | |
76
-
77
-
78
- ## Installation
79
- ```bash
80
- pip install neuromeka_vfm
81
- ```
82
-
83
- ## 사용 예
84
- ### Python API
85
- ```python
86
- from neuromeka_vfm import PoseEstimation, upload_mesh
87
- # (옵션) Realtime segmentation client도 포함됩니다.
88
-
89
- # 1) 서버로 mesh 업로드 (호스트 경로는 컨테이너에 -v로 마운트된 곳)
90
- upload_mesh(
91
- host="192.168.10.72",
92
- user="user",
93
- password="pass", # 또는 key="~/.ssh/id_rsa"
94
- local="mesh/123.stl",
95
- remote="/home/user/meshes/123.stl",
96
- )
97
-
98
- # 2) PoseEstimation 클라이언트
99
- pose = PoseEstimation(host="192.168.10.72", port=5557)
100
- pose.init(mesh_path="/app/modules/foundation_pose/mesh/123.stl")
101
- # ...
102
- pose.close()
103
-
104
- # 3) Realtime segmentation client (예)
105
- from neuromeka_vfm import Segmentation
106
- seg = Segmentation(
107
- hostname="192.168.10.63",
108
- port=5432, # 해당 도커/서버 포트
109
- compression_strategy="png", # none | png | jpeg | h264
110
- benchmark=False,
111
- )
112
- # seg.register_first_frame(...)
113
- # seg.get_next(...)
114
- # seg.reset()
115
- # seg.finish()
116
- ```
117
-
118
- ## 주의
119
- - `remote`는 **호스트** 경로입니다. 컨테이너 실행 시 `-v /home/user/meshes:/app/modules/foundation_pose/mesh`처럼 마운트하면, 업로드 직후 컨테이너에서 접근 가능합니다.
120
- - RPC 포트(기본 5557)는 서버가 `-p 5557:5557`으로 노출되어 있어야 합니다.
121
-
122
-
123
-
124
- ## API 레퍼런스 (Python)
125
-
126
- ### PoseEstimation (FoundationPose RPC)
127
- - `PoseEstimation(host=None, port=None)`
128
- - `host`: FoundationPose 도커 서버가 구동 중인 PC의 IP.
129
- - `port`: 5557
130
- - `init(mesh_path, apply_scale=1.0, force_apply_color=False, apply_color=(160,160,160), est_refine_iter=10, track_refine_iter=3, min_n_views=40, inplane_step=60)`: 서버에 메쉬 등록 및 초기화.
131
- - `register(rgb, depth, mask, K, iteration=None, check_vram=True)`: 첫 프레임 등록. `iteration`을 생략하면 서버 기본 반복 횟수를 사용하며, `check_vram=False`로 두면 GPU 메모리 사전 체크를 건너뜁니다.
132
- - `track(rgb, depth, K, iteration=None, bbox_xywh=None)`: 추적/갱신. `bbox_xywh` 제공 시 해당 영역으로 탐색 범위를 좁힙니다.
133
- - `reset()`: 세션 리셋.
134
- - `reset_object()`: 캐시된 메쉬로 서버 측 `reset_object` 재호출.
135
- - `close()`: ZeroMQ 소켓/컨텍스트 정리 (사용 후 필수 호출 권장).
136
-
137
- ### Segmentation (실시간 SAM2/GroundingDINO)
138
- - `Segmentation(hostname, port, compression_strategy="none", benchmark=False)`:
139
- - `compression_strategy`: `none|png|jpeg|h264`
140
- - `hostname`: 세그멘테이션 도커 서버가 구동 중인 PC의 IP.
141
- - `add_image_prompt(object_name, object_image)`: 이미지 프롬프트 등록.
142
- - `register_first_frame(frame, prompt, use_image_prompt=False) -> bool`: 첫 프레임 등록, 성공 시 `True` 반환. `use_image_prompt=True`면 모든 이름을 사전에 `add_image_prompt`로 등록해야 합니다(누락 시 `ValueError`).
143
- - `get_next(frame) -> dict[obj_id, mask] | None`: 다음 프레임 세그멘테이션/트래킹 결과.
144
- - `switch_compression_strategy(compression_strategy)`: 런타임 압축 방식 교체.
145
- - `reset()`: 내부 상태 및 벤치마크 타이머 리셋.
146
- - `finish()`: 로컬 상태 초기화.
147
- - `close()`: ZeroMQ 소켓/컨텍스트 정리 (사용 후 필수 호출 권장).
148
-
149
- ### 업로드 CLI/API
150
- - `upload_mesh(host, user, port=22, password=None, key=None, local=None, remote=None)`: SSH/SFTP로 메쉬 전송, 비밀번호 또는 키 중 하나 필수.
151
- - CLI: `neuromeka-upload-mesh --host ... --user ... (--password ... | --key ...) --local ... --remote ...`
152
-
153
- ### 예제
154
- - 실시간 Pose + Segmentation 데모: `python -m neuromeka_vfm.examples.pose_demo` (RealSense 필요, 서버 실행 상태에서 사용).
155
-
156
-
157
- ## 릴리스 노트
158
- - 0.1.1: PoseEstimation/Segmentation에서 리소스 정리 개선, iteration 미전달 시 서버 기본값 사용, pose 데모 예제 추가.
159
- - 0.1.0: 초기 공개 버전. FoundationPose RPC 클라이언트, 실시간 세그멘테이션 클라이언트, SSH 기반 mesh 업로드 CLI/API 포함.
File without changes
File without changes