Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问大佬,font_demo_cache.bin开源了吗 #26

Closed
Yasuharaaa opened this issue Nov 30, 2023 · 1 comment
Closed

请问大佬,font_demo_cache.bin开源了吗 #26

Yasuharaaa opened this issue Nov 30, 2023 · 1 comment

Comments

@Yasuharaaa
Copy link

请问有输出label具体的字体名列表吗

@JeffersonQin
Copy link
Owner

开源了。

def prepare_fonts(cache_path="font_demo_cache.bin"):
print("Preparing fonts ...")
if os.path.exists(cache_path):
return pickle.load(open(cache_path, "rb"))
font_list, exclusion_rule = load_fonts()
font_list = list(filter(lambda x: not exclusion_rule(x), font_list))
font_list.sort(key=lambda x: x.path)
for i in range(len(font_list)):
font_list[i].path = font_list[i].path[18:] # remove ./dataset/fonts/./ prefix
with open(cache_path, "wb") as f:
pickle.dump(font_list, f)
return font_list

文件在这个 docker 内自己 exec /bin/bash 进去看,我本地也没这个文件了:https://hub.docker.com/repository/docker/jeffersonqin/yuzumarker.fontdetection.huggingfacespace.base/general

@JeffersonQin JeffersonQin pinned this issue Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants