Fix solution functions description + integrations/openvino.md cover image update (#8170)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
52604084de
commit
78f7e475fa
4 changed files with 18 additions and 11 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue