ultralytics 8.0.223 add YOLOv8-Ghost P2 and P6 variants (#6826)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Burhan <62214284+Burhan-Q@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Rizwan Munawar <chr043416@gmail.com>
Co-authored-by: Awsome <1579093407@qq.com>
This commit is contained in:
Glenn Jocher 2023-12-07 01:01:02 +01:00 committed by GitHub
parent 742cbc1b4e
commit d74a5a9499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 153 additions and 16 deletions

View file

@ -345,9 +345,10 @@ class BasePredictor:
else: # 'video' or 'stream'
frames_path = f'{save_path.split(".", 1)[0]}_frames/'
if self.vid_path[idx] != save_path: # new video
Path(frames_path).mkdir(parents=True, exist_ok=True)
self.vid_path[idx] = save_path
self.vid_frame[idx] = 0
if self.args.save_frames:
Path(frames_path).mkdir(parents=True, exist_ok=True)
self.vid_path[idx] = save_path
self.vid_frame[idx] = 0
if isinstance(self.vid_writer[idx], cv2.VideoWriter):
self.vid_writer[idx].release() # release previous video writer
if vid_cap: # video
@ -363,8 +364,9 @@ class BasePredictor:
self.vid_writer[idx].write(im0)
# Write frame
cv2.imwrite(f'{frames_path}{self.vid_frame[idx]}.jpg', im0)
self.vid_frame[idx] += 1
if self.args.save_frames:
cv2.imwrite(f'{frames_path}{self.vid_frame[idx]}.jpg', im0)
self.vid_frame[idx] += 1
def run_callbacks(self, event: str):
"""Runs all registered callbacks for a specific event."""