Fix solution functions description + `integrations/openvino.md` cover image update (#8170)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/8173/head
Muhammad Rizwan Munawar 1 year ago committed by GitHub
parent 52604084de
commit 78f7e475fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      docs/en/integrations/openvino.md
  2. 12
      ultralytics/solutions/ai_gym.py
  3. 9
      ultralytics/solutions/distance_calculation.py
  4. 6
      ultralytics/solutions/speed_estimation.py

@ -6,7 +6,7 @@ keywords: ultralytics docs, YOLOv8, export YOLOv8, YOLOv8 model deployment, expo
# Intel OpenVINO Export
<img width="1024" src="https://user-images.githubusercontent.com/26833433/252345644-0cf84257-4b34-404c-b7ce-eb73dfbcaff1.png" alt="OpenVINO Ecosystem">
<img width="1024" src="https://github.com/RizwanMunawar/RizwanMunawar/assets/62513924/2b181f68-aa91-4514-ba09-497cc3c83b00" alt="OpenVINO Ecosystem">
In this guide, we cover exporting YOLOv8 models to the [OpenVINO](https://docs.openvino.ai/) format, which can provide up to 3x [CPU](https://docs.openvino.ai/nightly/openvino_docs_OV_UG_supported_plugins_CPU.html) speedup as well as accelerating on other Intel hardware ([iGPU](https://docs.openvino.ai/nightly/openvino_docs_OV_UG_supported_plugins_GPU.html), [dGPU](https://docs.openvino.ai/nightly/openvino_docs_OV_UG_supported_plugins_GPU.html), [VPU](https://docs.openvino.ai/2022.3/openvino_docs_OV_UG_supported_plugins_VPU.html), etc.).

@ -46,14 +46,15 @@ class AIGym:
pose_type="pullup",
):
"""
Configures the AIGym line_thickness, save image and view image parameters
Configures the AIGym line_thickness, save image and view image parameters.
Args:
kpts_to_check (list): 3 keypoints for counting
line_thickness (int): Line thickness for bounding boxes.
view_img (bool): display the im0
pose_up_angle (float): Angle to set pose position up
pose_down_angle (float): Angle to set pose position down
pose_type: "pushup", "pullup" or "abworkout"
pose_type (str): "pushup", "pullup" or "abworkout"
"""
self.kpts_to_check = kpts_to_check
self.tf = line_thickness
@ -64,11 +65,12 @@ class AIGym:
def start_counting(self, im0, results, frame_count):
"""
Function used to count the gym steps
Function used to count the gym steps.
Args:
im0 (ndarray): Current frame from the video stream.
results: Pose estimation data
frame_count: store current frame count
results (list): Pose estimation data
frame_count (int): store current frame count
"""
self.im0 = im0
if frame_count == 1:

@ -107,7 +107,8 @@ class DistanceCalculation:
def calculate_centroid(self, box):
"""
Calculate the centroid of bounding box
Calculate the centroid of bounding box.
Args:
box (list): Bounding box data
"""
@ -115,7 +116,8 @@ class DistanceCalculation:
def calculate_distance(self, centroid1, centroid2):
"""
Calculate distance between two centroids
Calculate distance between two centroids.
Args:
centroid1 (point): First bounding box data
centroid2 (point): Second bounding box data
@ -125,7 +127,8 @@ class DistanceCalculation:
def start_process(self, im0, tracks):
"""
Calculate distance between two bounding boxes based on tracking data
Calculate distance between two bounding boxes based on tracking data.
Args:
im0 (nd array): Image
tracks (list): List of tracks obtained from the object tracking process.

@ -124,7 +124,8 @@ class SpeedEstimator:
def calculate_speed(self, trk_id, track):
"""
Calculation of object speed
Calculation of object speed.
Args:
trk_id (int): object track id.
track (list): tracking history for tracks path drawing
@ -155,7 +156,8 @@ class SpeedEstimator:
def estimate_speed(self, im0, tracks):
"""
Calculate object based on tracking data
Calculate object based on tracking data.
Args:
im0 (nd array): Image
tracks (list): List of tracks obtained from the object tracking process.

Loading…
Cancel
Save