dora-sam2 0.3.10rc1__tar.gz → 0.3.11__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.
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: dora-sam2
3
- Version: 0.3.10rc1
3
+ Version: 0.3.11
4
4
  Summary: dora-sam2
5
5
  Author-email: Your Name <email@email.com>
6
6
  License: MIT
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: dora-rs>=0.3.10rc1
9
+ Requires-Dist: dora-rs>=0.3.9
10
10
  Requires-Dist: huggingface-hub>=0.29.0
11
11
  Requires-Dist: opencv-python>=4.11.0.86
12
12
  Requires-Dist: sam2>=1.1.0
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  import os
2
4
 
3
5
  # Define the path to the README file relative to the package directory
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  from .main import main
2
4
 
3
5
  if __name__ == "__main__":
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  import cv2
2
4
  import numpy as np
3
5
  import pyarrow as pa
@@ -10,6 +12,7 @@ predictor = SAM2ImagePredictor.from_pretrained("facebook/sam2-hiera-large")
10
12
 
11
13
 
12
14
  def main():
15
+ """TODO: Add docstring."""
13
16
  pa.array([]) # initialize pyarrow array
14
17
  node = Node()
15
18
  frames = {}
@@ -119,8 +122,8 @@ def main():
119
122
  {
120
123
  "masks": masks.ravel(),
121
124
  "labels": event["value"]["labels"],
122
- }
123
- ]
125
+ },
126
+ ],
124
127
  ),
125
128
  metadata={
126
129
  "image_id": image_id,
@@ -129,7 +132,7 @@ def main():
129
132
  },
130
133
  )
131
134
 
132
- elif "boxes2d" in event_id:
135
+ if "boxes2d" in event_id:
133
136
 
134
137
  if isinstance(event["value"], pa.StructArray):
135
138
  boxes2d = event["value"][0].get("bbox").values.to_numpy()
@@ -159,7 +162,7 @@ def main():
159
162
  ):
160
163
  predictor.set_image(frames[image_id])
161
164
  masks, _scores, last_pred = predictor.predict(
162
- box=boxes2d, point_labels=labels, multimask_output=False
165
+ box=boxes2d, point_labels=labels, multimask_output=False,
163
166
  )
164
167
 
165
168
  if len(masks.shape) == 4:
@@ -190,8 +193,8 @@ def main():
190
193
  {
191
194
  "masks": masks.ravel(),
192
195
  "labels": event["value"]["labels"],
193
- }
194
- ]
196
+ },
197
+ ],
195
198
  ),
196
199
  metadata={
197
200
  "image_id": image_id,
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: dora-sam2
3
- Version: 0.3.10rc1
3
+ Version: 0.3.11
4
4
  Summary: dora-sam2
5
5
  Author-email: Your Name <email@email.com>
6
6
  License: MIT
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: dora-rs>=0.3.10rc1
9
+ Requires-Dist: dora-rs>=0.3.9
10
10
  Requires-Dist: huggingface-hub>=0.29.0
11
11
  Requires-Dist: opencv-python>=4.11.0.86
12
12
  Requires-Dist: sam2>=1.1.0
@@ -1,4 +1,4 @@
1
- dora-rs>=0.3.10rc1
1
+ dora-rs>=0.3.9
2
2
  huggingface-hub>=0.29.0
3
3
  opencv-python>=4.11.0.86
4
4
  sam2>=1.1.0
@@ -0,0 +1,36 @@
1
+ [project]
2
+ name = "dora-sam2"
3
+ version = "0.3.11"
4
+ authors = [{ name = "Your Name", email = "email@email.com" }]
5
+ description = "dora-sam2"
6
+ license = { text = "MIT" }
7
+ readme = "README.md"
8
+ requires-python = ">=3.10"
9
+
10
+ dependencies = [
11
+ "dora-rs >= 0.3.9",
12
+ "huggingface-hub>=0.29.0",
13
+ "opencv-python>=4.11.0.86",
14
+ "sam2>=1.1.0",
15
+ ]
16
+
17
+ [tool.uv]
18
+ no-build-isolation-package = ['sam2']
19
+
20
+ [dependency-groups]
21
+ dev = ["pytest >=8.1.1", "ruff >=0.9.1"]
22
+
23
+ [project.scripts]
24
+ dora-sam2 = "dora_sam2.main:main"
25
+
26
+ [tool.ruff.lint]
27
+ extend-select = [
28
+ "D", # pydocstyle
29
+ "UP", # Ruff's UP rule
30
+ "PERF", # Ruff's PERF rule
31
+ "RET", # Ruff's RET rule
32
+ "RSE", # Ruff's RSE rule
33
+ "NPY", # Ruff's NPY rule
34
+ "N", # Ruff's N rule
35
+ "I", # Ruff's I rule
36
+ ]
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  import os
2
4
 
3
5
  import pytest
@@ -6,6 +8,7 @@ CI = os.getenv("CI", "false") in ["True", "true"]
6
8
 
7
9
 
8
10
  def test_import_main():
11
+ """TODO: Add docstring."""
9
12
  if CI:
10
13
  # Skip test as test requires Nvidia GPU
11
14
  return
@@ -1,21 +0,0 @@
1
- [project]
2
- name = "dora-sam2"
3
- version = "0.3.10-rc1"
4
- authors = [{ name = "Your Name", email = "email@email.com" }]
5
- description = "dora-sam2"
6
- license = { text = "MIT" }
7
- readme = "README.md"
8
- requires-python = ">=3.10"
9
-
10
- dependencies = [
11
- "dora-rs >= 0.3.10rc1",
12
- "huggingface-hub>=0.29.0",
13
- "opencv-python>=4.11.0.86",
14
- "sam2>=1.1.0",
15
- ]
16
-
17
- [dependency-groups]
18
- dev = ["pytest >=8.1.1", "ruff >=0.9.1"]
19
-
20
- [project.scripts]
21
- dora-sam2 = "dora_sam2.main:main"
File without changes
File without changes