Add instance segmentation and vision-eye mapping in Docs + Fix minor code bug in other real-world-projects (#6972)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
e9def85f1f
commit
34b10b2db3
10 changed files with 385 additions and 56 deletions
|
|
@ -62,7 +62,7 @@ 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
|
||||
|
|
|
|||
|
|
@ -139,10 +139,11 @@ class ObjectCounter:
|
|||
else:
|
||||
self.in_counts += 1
|
||||
|
||||
incount_label = 'InCount : ' + f'{self.in_counts}'
|
||||
outcount_label = 'OutCount : ' + f'{self.out_counts}'
|
||||
self.annotator.count_labels(in_count=incount_label, out_count=outcount_label)
|
||||
|
||||
if self.env_check and self.view_img:
|
||||
incount_label = 'InCount : ' + f'{self.in_counts}'
|
||||
outcount_label = 'OutCount : ' + f'{self.out_counts}'
|
||||
self.annotator.count_labels(in_count=incount_label, out_count=outcount_label)
|
||||
cv2.namedWindow('Ultralytics YOLOv8 Object Counter')
|
||||
cv2.setMouseCallback('Ultralytics YOLOv8 Object Counter', self.mouse_event_for_region,
|
||||
{'region_points': self.reg_pts})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue