dora-sam2 0.3.10__py3-none-any.whl → 0.3.11__py3-none-any.whl

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.
dora_sam2/__init__.py CHANGED
@@ -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
dora_sam2/__main__.py CHANGED
@@ -1,3 +1,5 @@
1
+ """TODO: Add docstring."""
2
+
1
3
  from .main import main
2
4
 
3
5
  if __name__ == "__main__":
dora_sam2/main.py CHANGED
@@ -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,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: dora-sam2
3
- Version: 0.3.10
3
+ Version: 0.3.11
4
4
  Summary: dora-sam2
5
5
  Author-email: Your Name <email@email.com>
6
6
  License: MIT
@@ -0,0 +1,8 @@
1
+ dora_sam2/__init__.py,sha256=tF7WHhHiDweUUzyHsbmFe_ktphE08aA5j33E4ja1udA,381
2
+ dora_sam2/__main__.py,sha256=NlAb6Jbmmn82K8Ahdi12sliZYdzyY7QaoCCHRuoR_Hg,90
3
+ dora_sam2/main.py,sha256=aQj1zZTtpzebwaayyPqD4B82iFscLKuZ5v7COs3dTNE,8487
4
+ dora_sam2-0.3.11.dist-info/METADATA,sha256=jTkg2BE_lLdUTroTRkZ6hdsT2xwwtF9Z2D_SYtgG8_Y,820
5
+ dora_sam2-0.3.11.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
6
+ dora_sam2-0.3.11.dist-info/entry_points.txt,sha256=eObMaDQauVA_sv4J6fsNjn8V-8syGJK7mO-LrsBu1aA,50
7
+ dora_sam2-0.3.11.dist-info/top_level.txt,sha256=IgKcOITGe2Nlyc79J6dwh3dcp3Wsf-IipIy-1h9GcPE,10
8
+ dora_sam2-0.3.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- dora_sam2/__init__.py,sha256=HuSK3dnyI9Pb5QAuaKFwQQ3J5SIZnLcKHPJO0norGzc,353
2
- dora_sam2/__main__.py,sha256=Vdhw8YA1K3wPMlbJQYL5WqvRzAKVeZ16mZQFO9VRmCo,62
3
- dora_sam2/main.py,sha256=zwMJwenWZdmpMfriS8C903g7QdO-qOJrn2lP4PCcPyo,8425
4
- dora_sam2-0.3.10.dist-info/METADATA,sha256=bC15e7QBHnl8nyT-E5tQLoPdI9LAviaLNsUD7ZglJB0,820
5
- dora_sam2-0.3.10.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
6
- dora_sam2-0.3.10.dist-info/entry_points.txt,sha256=eObMaDQauVA_sv4J6fsNjn8V-8syGJK7mO-LrsBu1aA,50
7
- dora_sam2-0.3.10.dist-info/top_level.txt,sha256=IgKcOITGe2Nlyc79J6dwh3dcp3Wsf-IipIy-1h9GcPE,10
8
- dora_sam2-0.3.10.dist-info/RECORD,,