Skip to content

Commit

Permalink
Merge pull request #1148 from roboflow/fix/code_examples_after_superv…
Browse files Browse the repository at this point in the history
…ision_0.20.0_release

fix/code examples after supervision 0.20.0 release
  • Loading branch information
SkalskiP authored Apr 26, 2024
2 parents 9b44729 + a532670 commit 6ef9ba7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/count_people_in_zone/inference_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def initiate_annotators(
) -> Tuple[
List[sv.PolygonZone], List[sv.PolygonZoneAnnotator], List[sv.BoundingBoxAnnotator]
]:
line_thickness = sv.calculate_dynamic_line_thickness(resolution_wh=resolution_wh)
text_scale = sv.calculate_dynamic_text_scale(resolution_wh=resolution_wh)
line_thickness = sv.calculate_optimal_line_thickness(resolution_wh=resolution_wh)
text_scale = sv.calculate_optimal_text_scale(resolution_wh=resolution_wh)

zones = []
zone_annotators = []
Expand Down
4 changes: 2 additions & 2 deletions examples/count_people_in_zone/ultralytics_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def initiate_annotators(
) -> Tuple[
List[sv.PolygonZone], List[sv.PolygonZoneAnnotator], List[sv.BoundingBoxAnnotator]
]:
line_thickness = sv.calculate_dynamic_line_thickness(resolution_wh=resolution_wh)
text_scale = sv.calculate_dynamic_text_scale(resolution_wh=resolution_wh)
line_thickness = sv.calculate_optimal_line_thickness(resolution_wh=resolution_wh)
text_scale = sv.calculate_optimal_text_scale(resolution_wh=resolution_wh)

zones = []
zone_annotators = []
Expand Down
4 changes: 2 additions & 2 deletions examples/speed_estimation/inference_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ def parse_arguments() -> argparse.Namespace:
frame_rate=video_info.fps, track_thresh=args.confidence_threshold
)

thickness = sv.calculate_dynamic_line_thickness(
thickness = sv.calculate_optimal_line_thickness(
resolution_wh=video_info.resolution_wh
)
text_scale = sv.calculate_dynamic_text_scale(resolution_wh=video_info.resolution_wh)
text_scale = sv.calculate_optimal_text_scale(resolution_wh=video_info.resolution_wh)
bounding_box_annotator = sv.BoundingBoxAnnotator(thickness=thickness)
label_annotator = sv.LabelAnnotator(
text_scale=text_scale,
Expand Down
4 changes: 2 additions & 2 deletions examples/speed_estimation/ultralytics_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def parse_arguments() -> argparse.Namespace:
frame_rate=video_info.fps, track_thresh=args.confidence_threshold
)

thickness = sv.calculate_dynamic_line_thickness(
thickness = sv.calculate_optimal_line_thickness(
resolution_wh=video_info.resolution_wh
)
text_scale = sv.calculate_dynamic_text_scale(resolution_wh=video_info.resolution_wh)
text_scale = sv.calculate_optimal_text_scale(resolution_wh=video_info.resolution_wh)
bounding_box_annotator = sv.BoundingBoxAnnotator(thickness=thickness)
label_annotator = sv.LabelAnnotator(
text_scale=text_scale,
Expand Down
4 changes: 2 additions & 2 deletions examples/speed_estimation/yolo_nas_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def parse_arguments() -> argparse.Namespace:
frame_rate=video_info.fps, track_thresh=args.confidence_threshold
)

thickness = sv.calculate_dynamic_line_thickness(
thickness = sv.calculate_optimal_line_thickness(
resolution_wh=video_info.resolution_wh
)
text_scale = sv.calculate_dynamic_text_scale(resolution_wh=video_info.resolution_wh)
text_scale = sv.calculate_optimal_text_scale(resolution_wh=video_info.resolution_wh)
bounding_box_annotator = sv.BoundingBoxAnnotator(thickness=thickness)
label_annotator = sv.LabelAnnotator(
text_scale=text_scale,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "supervision"
version = "0.20.0"
version = "0.21.0rc1"
description = "A set of easy-to-use utils that will come in handy in any Computer Vision project"
authors = ["Piotr Skalski <[email protected]>"]
maintainers = ["Piotr Skalski <[email protected]>"]
Expand Down

0 comments on commit 6ef9ba7

Please sign in to comment.