vidformer 0.10.0__py3-none-any.whl → 0.10.1__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.
vidformer/__init__.py
CHANGED
@@ -499,31 +499,40 @@ class LabelAnnotator:
|
|
499
499
|
|
500
500
|
border_radius = min(border_radius, min(width, height) // 2)
|
501
501
|
|
502
|
-
|
503
|
-
((x1 + border_radius, y1), (x2 - border_radius, y2)),
|
504
|
-
((x1, y1 + border_radius), (x2, y2 - border_radius)),
|
505
|
-
]
|
506
|
-
circle_centers = [
|
507
|
-
(x1 + border_radius, y1 + border_radius),
|
508
|
-
(x2 - border_radius, y1 + border_radius),
|
509
|
-
(x1 + border_radius, y2 - border_radius),
|
510
|
-
(x2 - border_radius, y2 - border_radius),
|
511
|
-
]
|
512
|
-
|
513
|
-
for coordinates in rectangle_coordinates:
|
502
|
+
if border_radius <= 0:
|
514
503
|
vf_cv2.rectangle(
|
515
504
|
img=scene,
|
516
|
-
pt1=
|
517
|
-
pt2=
|
518
|
-
color=color,
|
519
|
-
thickness=-1,
|
520
|
-
)
|
521
|
-
for center in circle_centers:
|
522
|
-
vf_cv2.circle(
|
523
|
-
img=scene,
|
524
|
-
center=center,
|
525
|
-
radius=border_radius,
|
505
|
+
pt1=(x1, y1),
|
506
|
+
pt2=(x2, y2),
|
526
507
|
color=color,
|
527
508
|
thickness=-1,
|
528
509
|
)
|
510
|
+
else:
|
511
|
+
rectangle_coordinates = [
|
512
|
+
((x1 + border_radius, y1), (x2 - border_radius, y2)),
|
513
|
+
((x1, y1 + border_radius), (x2, y2 - border_radius)),
|
514
|
+
]
|
515
|
+
circle_centers = [
|
516
|
+
(x1 + border_radius, y1 + border_radius),
|
517
|
+
(x2 - border_radius, y1 + border_radius),
|
518
|
+
(x1 + border_radius, y2 - border_radius),
|
519
|
+
(x2 - border_radius, y2 - border_radius),
|
520
|
+
]
|
521
|
+
|
522
|
+
for coordinates in rectangle_coordinates:
|
523
|
+
vf_cv2.rectangle(
|
524
|
+
img=scene,
|
525
|
+
pt1=coordinates[0],
|
526
|
+
pt2=coordinates[1],
|
527
|
+
color=color,
|
528
|
+
thickness=-1,
|
529
|
+
)
|
530
|
+
for center in circle_centers:
|
531
|
+
vf_cv2.circle(
|
532
|
+
img=scene,
|
533
|
+
center=center,
|
534
|
+
radius=border_radius,
|
535
|
+
color=color,
|
536
|
+
thickness=-1,
|
537
|
+
)
|
529
538
|
return scene
|
@@ -0,0 +1,6 @@
|
|
1
|
+
vidformer/__init__.py,sha256=7ZUQSCEoTkxGFORCWhL1WAgS_ii0Xu_kaipjjstUAn4,44916
|
2
|
+
vidformer/cv2/__init__.py,sha256=DGm5NB4FGCHxPVez-yO748DjocKruxn4QBqqThgskWI,25555
|
3
|
+
vidformer/supervision/__init__.py,sha256=unJMfbabIBQ36iftcs6QUM3mzdWFRxrlLdk_Z1F1oO8,17489
|
4
|
+
vidformer-0.10.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
5
|
+
vidformer-0.10.1.dist-info/METADATA,sha256=fzOpw2PCiHhZgeFS6rBxrlutcMs7v6oznjnWz-f6j-Y,1800
|
6
|
+
vidformer-0.10.1.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
vidformer/__init__.py,sha256=qpWcttHsW1wnaGx5__qJqaT-m5VF7yMiHCxdm10Fjek,44916
|
2
|
-
vidformer/cv2/__init__.py,sha256=DGm5NB4FGCHxPVez-yO748DjocKruxn4QBqqThgskWI,25555
|
3
|
-
vidformer/supervision/__init__.py,sha256=T2QJ3gKtUSoKOlxAf06TG4fD9IgIDuBpiVOBKVk3qAw,17150
|
4
|
-
vidformer-0.10.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
5
|
-
vidformer-0.10.0.dist-info/METADATA,sha256=f_aUIFbQUoVJuYTKtqexwyN5uzWRoS2Fvd2dHZ_EGbo,1800
|
6
|
-
vidformer-0.10.0.dist-info/RECORD,,
|
File without changes
|