Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
QIN2DIM committed Sep 29, 2023
1 parent 499dc10 commit 5428de6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion automation/assets_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def merge(self, fd: Path, td: Path):


def run():
sources = "crow"
sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/762"
am = AssetsManager.from_sources(sources)
am.execute()

Expand Down
13 changes: 11 additions & 2 deletions automation/continue_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@

import hcaptcha_challenger as solver
from hcaptcha_challenger import LocalBinaryClassifier
from hcaptcha_challenger.onnx.modelhub import request_resource, ModelHub


def upgrade_objects():
modelhub = ModelHub.from_github_repo()
objects_url = (
"https://raw.githubusercontent.com/QIN2DIM/hcaptcha-challenger/main/src/objects.yaml"
)
request_resource(objects_url, modelhub.objects_path)


@dataclass
Expand Down Expand Up @@ -63,7 +72,7 @@ def execute(self):
yes_dir, bad_dir = self.mkdir()

if self.branch == "remote":
solver.install(upgrade=True)
upgrade_objects()
classifier = solver.BinaryClassifier()
results = classifier.execute(self.prompt, self._images)
for i, result in enumerate(results):
Expand Down Expand Up @@ -109,4 +118,4 @@ def run(prompt: str, model_name: str | None = None):


if __name__ == "__main__":
run("crow")
run("plant", "plant2317.onnx")
2 changes: 1 addition & 1 deletion automation/datasets_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from hcaptcha_challenger.utils import SiteKey

collected = []
per_times = 50
per_times = 150
tmp_dir = Path(__file__).parent.joinpath("tmp_dir")
sitekey = SiteKey.user_easy

Expand Down
5 changes: 4 additions & 1 deletion automation/mini_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ def roll_upgrade(asset_id):
# "plant": "plant2315",
# "river": "river2310" # 1
# "crane": "crane2300",
"snowman": "snowman2310",
# "snowman": "snowman2310",
# "crow": "crow2309",
# "truck": "truck2310"
# "plant": "plant23001",
"animal_statue": "animal_statue2309",
}
# fmt:on

Expand Down
2 changes: 1 addition & 1 deletion automation/zip_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def zip_dataset(prompt: str):
print(f">> OUTPUT - {zip_path=}")


zip_dataset(prompt="industrial_scene")
zip_dataset(prompt="plant")

0 comments on commit 5428de6

Please sign in to comment.