Skip to content

Commit

Permalink
fe
Browse files Browse the repository at this point in the history
  • Loading branch information
QIN2DIM committed Nov 14, 2023
1 parent b7ebb04 commit 4450f0c
Show file tree
Hide file tree
Showing 18 changed files with 560 additions and 349 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@ archive/
# frontend
frontend/*.db
frontend/.web
**/__pycache__/
**/__pycache__/
**/istock_tmp/
102 changes: 0 additions & 102 deletions automation/04_mini_workflow.py

This file was deleted.

169 changes: 0 additions & 169 deletions automation/05_zip_dataset.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ def merge(self, fd: Path, td: Path):


def run():
sources = "electronic device"
sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/696"
sources = "the largest animal in real life"

am = AssetsManager.from_sources(sources)
am.execute()
Expand Down
24 changes: 12 additions & 12 deletions automation/03_auto_labeling.py → automation/_03_auto_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def from_tnf(cls, name: str, yes: List[str], bad: List[str]):
return cls(nested_name=name, yes_seq=yes, bad_seq=bad)

def _offload(self, tag: str, dirname: str, tmp_case_dir: Path, *, to_dir: Path):
if DataLake.PREMISED_YES.format(tag) == dirname:
if dirname in DataLake.PREMISED_YES.format(tag):
logging.info(f"refactor - name={self.nested_name} {tag=}")
for image_name in os.listdir(tmp_case_dir):
image_path = tmp_case_dir.joinpath(image_name)
Expand Down Expand Up @@ -133,11 +133,11 @@ def mkdir(self, multi: bool = False) -> Tuple[Path, Path]:
return yes_dir, bad_dir

def execute(
self,
model,
substack: Dict[str, Dict[str, List[str]]] = None,
enable_gaussian: bool | None = None,
**kwargs,
self,
model,
substack: Dict[str, Dict[str, List[str]]] = None,
enable_gaussian: bool | None = None,
**kwargs,
):
if not self.pending_tasks:
logging.info("No pending tasks")
Expand Down Expand Up @@ -212,10 +212,10 @@ def check_card(pending_card: list) -> NoReturn | bool:


def run(
suffix_filter: str,
cards: list,
base_dirname: str = "database2309",
enable_gaussian: bool | None = None,
suffix_filter: str,
cards: list,
base_dirname: str = "database2309",
enable_gaussian: bool | None = None,
):
if not suffix_filter:
return
Expand Down Expand Up @@ -255,7 +255,7 @@ def run(
logging.info(f"Loading {len(flow_card)=}")
logging.info(f"Loading {len(flow_card_nested_animal)=}")

run("e1_mouse", cards=flow_card_nested_animal)
# run("land_vehicle", cards=flow_card)
# run("w1_cactus", cards=flow_card_nested_animal)
# run("land_vehicle", cards=flow_card)
run("l2_lion", cards=flow_card_nested_animal)
# run("bus", cards=flow_card_recaptcha_challenge, enable_gaussian=True)
Loading

0 comments on commit 4450f0c

Please sign in to comment.