Skip to content

Commit

Permalink
Feat(automation): check yolo model
Browse files Browse the repository at this point in the history
  • Loading branch information
QIN2DIM committed Oct 14, 2023
1 parent d0ca381 commit 57ab8e4
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,5 @@ archive/
.run
**/assets_cache.txt
**/tmp_dir**
automation/zip_dir
automation/zip_dir/
automation/yolo_mocker/
30 changes: 30 additions & 0 deletions automation/check_yolo_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Time : 2023/9/27 15:28
# Author : QIN2DIM
# GitHub : https://github.com/QIN2DIM
# Description:

import os
import sys
from pathlib import Path

from hcaptcha_challenger.components.yolo_mocker import CcYOLO


def run():
model_name = "head_of_the_animal_2310_yolov8s.onnx"
images_dir = "tmp_dir/image_label_area_select/please click on the head of the animal/default"

this_dir = Path(__file__).parent
output_dir = this_dir.joinpath("yolo_mocker")
images_dir = this_dir.joinpath(images_dir).absolute()

ccy = CcYOLO(model_name, images_dir, output_dir)
ccy.spawn()

if "win32" in sys.platform:
os.startfile(ccy.output_dir)


if __name__ == "__main__":
run()
7 changes: 6 additions & 1 deletion automation/continue_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
from typing import List, Tuple, Literal

import hcaptcha_challenger as solver
from hcaptcha_challenger import LocalBinaryClassifier, split_prompt_message, label_cleaning, ModelHub
from hcaptcha_challenger import (
LocalBinaryClassifier,
split_prompt_message,
label_cleaning,
ModelHub,
)


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion automation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hcaptcha-challenger[sentinel]
hcaptcha-challenger[sentinel]==0.8.6-post1
bs4

0 comments on commit 57ab8e4

Please sign in to comment.