-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dev/waifu2x
- Loading branch information
Showing
40 changed files
with
7,013 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
imgutils.detect.eye | ||
========================== | ||
|
||
.. currentmodule:: imgutils.detect.eye | ||
|
||
.. automodule:: imgutils.detect.eye | ||
|
||
|
||
detect_eyes | ||
------------------------------ | ||
|
||
.. autofunction:: detect_eyes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import random | ||
|
||
from benchmark import BaseBenchmark, create_plot_cli | ||
from imgutils.detect import detect_eyes | ||
|
||
|
||
class EyeDetectBenchmark(BaseBenchmark): | ||
def __init__(self, level, version): | ||
BaseBenchmark.__init__(self) | ||
self.level = level | ||
self.version = version | ||
|
||
def load(self): | ||
from imgutils.detect.eye import _open_eye_detect_model | ||
_ = _open_eye_detect_model(level=self.level, version=self.version) | ||
|
||
def unload(self): | ||
from imgutils.detect.eye import _open_eye_detect_model | ||
_open_eye_detect_model.cache_clear() | ||
|
||
def run(self): | ||
image_file = random.choice(self.all_images) | ||
_ = detect_eyes(image_file, level=self.level, version=self.version) | ||
|
||
|
||
if __name__ == '__main__': | ||
create_plot_cli( | ||
[ | ||
('eye v1.0 (yolov8s)', EyeDetectBenchmark('s', 'v1.0')), | ||
('eye v1.0 (yolov8n)', EyeDetectBenchmark('n', 'v1.0')), | ||
('eye v0.8 (yolov8s)', EyeDetectBenchmark('s', 'v0.8')), | ||
('eye v0.7 (yolov8s)', EyeDetectBenchmark('s', 'v0.7')), | ||
], | ||
title='Benchmark for Anime Eyes Detections', | ||
run_times=10, | ||
try_times=20, | ||
)() |
Oops, something went wrong.