Skip to content

Commit

Permalink
ffe
Browse files Browse the repository at this point in the history
  • Loading branch information
QIN2DIM committed Nov 2, 2023
1 parent fa3358a commit 0d045e6
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,7 @@ archive/
**/assets_cache.txt
**/tmp_dir**
automation/zip_dir/
automation/yolo_mocker/
automation/yolo_mocker/

frontend/.web
frontend/*.db
8 changes: 4 additions & 4 deletions automation/assets_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ def run():
# the largest animal https://github.com/QIN2DIM/hcaptcha-challenger/issues/797
# red panda https://github.com/QIN2DIM/hcaptcha-challenger/issues/896
# sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/826" # the smallest animal
sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/896" # red panda
sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/897" # keyboard
# sources = "the largest animal"
# sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/896" # red panda
# sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/897" # keyboard
sources = "the largest animal"
# sources = "please click on the largest animal"
sources = "the smallest animal"
# sources = "the smallest animal"
# sources = "natural landscape"
# sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/857" # flamingo
# sources = "https://github.com/QIN2DIM/hcaptcha-challenger/issues/853"
Expand Down
5 changes: 1 addition & 4 deletions automation/auto_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ def check_card(pending_card: list) -> NoReturn | bool:
elif len(card[rk]) == 0:
logging.error(f"card 的必要信息不能为空 - {i=} key={rk} {require_keys=}")
ok = False
elif len(card[rk]) < 2:
logging.error(f"CLIP 模型在二分类任务上的准确率可能会比较糟糕 - {i=} ")
ok = False

for label in card[rk]:
if not isinstance(label, str):
Expand Down Expand Up @@ -246,4 +243,4 @@ def run(suffix_filter: str, cards: list, base_dirname: str = "database2309"):
logging.info(f"Loading {len(flow_card)=}")
logging.info(f"Loading {len(flow_card_nested_animal)=}")

run("s1_bird", cards=flow_card_nested_animal)
run("l1_penguin", cards=flow_card_nested_animal)
2 changes: 1 addition & 1 deletion automation/datasets_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
collected = []
per_times = 60
tmp_dir = Path(__file__).parent.joinpath("tmp_dir")
sitekey = SiteKey.epic
sitekey = SiteKey.user


async def collete_datasets(context: ASyncContext):
Expand Down
11 changes: 11 additions & 0 deletions automation/flow_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,15 @@
}
},
},
{
"positive_labels": ["penguin"],
"negative_labels": ["ant", "crab", "ladybug"],
"joined_dirs": ["the_largest_animal", "l1_penguin"],
"substack": {
"nested_largest_penguin": {
"yes": ["penguin"],
"bad": ["ant", "crab", "ladybug"],
}
}
}
]
6 changes: 3 additions & 3 deletions automation/zip_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ def run():
# nested_largest_ => the largest animal
# nested_smallest_ => the smallest animal
"""
prompt = "nested_smallest_bird"
prompt = "nested_largest_penguin"

# nested_prompt = ""
nested_prompt = "the smallest animal"
# nested_prompt = "the largest animal"
# nested_prompt = "the smallest animal"
nested_prompt = "the largest animal"

# 压缩数据集
tn = zip_dataset(prompt=prompt)
Expand Down
21 changes: 21 additions & 0 deletions frontend/frontend/components/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Time : 2023/11/2 17:56
# Author : QIN2DIM
# GitHub : https://github.com/QIN2DIM
# Description:
import reflex as rx


class Spline(rx.Component):
"""Spline component."""

library = "@splinetool/react-spline"
tag = "Spline"
# scene: rx.Var[str] = "https://prod.spline.design/Br2ec3WwuRGxEuij/scene.splinecode"
scene: rx.Var[str] = "https://prod.spline.design/PuLetvrUjzCqpW7y/scene.splinecode"
is_default = True

lib_dependencies: list[str] = ["@splinetool/runtime"]


spline = Spline.create

0 comments on commit 0d045e6

Please sign in to comment.