Skip to content

Commit

Permalink
hotfix: yolov8 warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi12-Ayalur committed Aug 27, 2024
1 parent 93d80a5 commit b95f635
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added object_detection/yolov8/test-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions object_detection/yolov8/yolov8_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ def __setup__(self):
self.current_world_classes = None
self.current_world_fast_classes = None

test_file = sieve.File("test-image.jpg")

print("Warming up inference...")

self.__predict__(test_file)
self.__predict__(test_file, models="yolov8n")
self.__predict__(test_file, models="yolov8l-face")
self.__predict__(test_file, models="yolov8n-face")
self.__predict__(test_file, models="yolov8s-world")
self.__predict__(test_file, models="yolov8l-world")

print("Inference warmed up.")

def __predict__(
self,
file: sieve.File,
Expand Down

0 comments on commit b95f635

Please sign in to comment.