Skip to content

Commit

Permalink
fix wrong labels
Browse files Browse the repository at this point in the history
  • Loading branch information
LingDong- committed Aug 8, 2020
1 parent 4d56926 commit 742529c
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
21 changes: 9 additions & 12 deletions data/labels_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
-78-4180_4083_223_207.png 薪
-21-5153_3610_221_202.png 耕
-H16-5214_1995_241_199.png 隤
-76-2608_2410_224_209.png
-76-2608_2410_224_209.png
-40-3230_4447_223_202.png 鵑
-H93-589_4567_241_198.png 芸
-39-1606_3201_224_198.png 幾
Expand Down Expand Up @@ -445,7 +445,7 @@
-4-571_4508_216_197.png 量
-H180-2325_2553_239_198.png 順
-H231-4977_1362_235_196.png 㝗
-H34-2341_3625_240_197.png
-H34-2341_3625_240_197.png 𤍂
-77-5171_4085_226_209.png 溜
-94-1990_1545_224_209.png 足
-H46-2238_4259_233_195.png 膲
Expand Down Expand Up @@ -1185,7 +1185,7 @@
-12-1958_3031_224_199.png 趬
-H135-4064_4107_233_193.png 瓌
-H218-1064_1314_234_194.png 爝
-H15-1145_1989_239_199.png
-H15-1145_1989_239_199.png
-38-2246_3204_220_198.png 求
-H158-808_3466_229_188.png 紈
-72-2273_2634_222_206.png 傳
Expand Down Expand Up @@ -1245,7 +1245,6 @@
-36-631_2572_221_200.png 騏
-95-1662_4052_223_208.png 鮑
-19-4837_1139_220_203.png 暈
-H38-5195_1865_244_199.png 替
-H86-3520_990_235_195.png 胏
-H192-2279_3240_233_189.png 歃
-93-4474_1955_218_204.png 芳
Expand Down Expand Up @@ -1938,7 +1937,6 @@
-H293-1107_942_235_194.png 笠
-H184-877_4386_240_197.png 勿
-39-3211_1990_220_198.png 郡
-H302-1103_1342_229_189.png 榦
-H385-5230_2304_229_194.png 跣
-76-4511_3256_224_208.png 鵠
-H252-579_1388_229_189.png 頷
Expand Down Expand Up @@ -2165,7 +2163,7 @@
-H53-543_3468_235_195.png 搜
-H91-1728_2161_241_202.png 秩
-H134-245_2732_236_195.png 燎
-H73-3759_4823_239_198.png
-H73-3759_4823_239_198.png
-16-4532_974_218_202.png 楓
-37-1925_2207_220_196.png 能
-4-5200_4488_214_199.png 歎
Expand Down Expand Up @@ -2293,7 +2291,7 @@
-68-957_4063_222_206.png 亭
-100-5471_2143_221_211.png 殘
-45-4834_1779_219_201.png 續
-77-3507_3665_226_209.png 刺
-H387-4375_4584_232_194.png 刺
-68-1284_3649_222_206.png 松
-H20-4002_4606_241_199.png 慨
-H113-3241_3345_235_194.png 瑕
Expand Down Expand Up @@ -2491,7 +2489,7 @@
-H39-5517_1463_241_196.png 脛
-H321-531_1895_233_194.png 蜄
-H338-1079_1346_232_189.png 堇
-36-2581_1769_221_200.png
-36-2581_1769_221_200.png
-115-271_4343_228_211.png 揖
-H173-1673_4102_235_194.png 圭
-H159-519_1542_230_189.png 罦
Expand Down Expand Up @@ -3142,7 +3140,7 @@
-45-926_2785_221_199.png 玦
-H364-4905_1008_234_199.png 袒
-H327-4702_1745_230_191.png 躄
-91-2325_1290_222_206.png 刊
-H376-4091_3631_233_194.png 刊
-H24-2318_3800_240_198.png 戮
-19-2591_2964_224_202.png 傍
-44-1618_2585_222_203.png 號
Expand Down Expand Up @@ -3188,7 +3186,6 @@
-H161-1663_3066_232_188.png 祟
-H405-1172_2923_239_194.png 臑
-H237-1140_2345_236_196.png 裦
-61-4211_3593_223_206.png 霏
-H314-3180_4428_234_193.png 蠬
-66-1299_2396_224_208.png 沫
-67-3537_2575_220_207.png 褐
Expand Down Expand Up @@ -3450,7 +3447,7 @@
-71-1950_2632_224_205.png 聲
-H427-4390_4005_227_194.png 總
-H50-1115_2136_232_195.png 駒
-H416-528_3663_234_193.png
-H416-528_3663_234_193.png
-H193-3264_4583_230_191.png 恲
-3-2488_3724_217_200.png 甚
-22-305_2007_220_199.png 曛
Expand Down Expand Up @@ -3971,7 +3968,7 @@
-H328-537_3444_232_192.png 懼
-H206-4438_1348_232_191.png 害
-14-613_3020_223_200.png 虛
-25-1271_1166_224_204.png 宇
-H8-486_2172_234_193.png 宇
-90-5176_3961_217_204.png 那
-21-3202_1785_221_202.png 箏
-H95-865_1589_241_200.png 溥
Expand Down
5 changes: 3 additions & 2 deletions data/variant_map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
蘖 𣖂
蚊 蟁
虻 蝱
斡 𠏉
奰 𡚤
竈 灶
巖 岩
Expand All @@ -78,4 +77,6 @@
㗖 啖
倣 仿
岐 歧
溼 濕
溼 濕
刊 栞
匆 怱
3 changes: 0 additions & 3 deletions workflow/forge_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,3 @@

font.generate("../dist/qiji.ttf")


祗襍雜朿束紙

18 changes: 9 additions & 9 deletions workflow/run_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
# os.system(cmd)


os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-1*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-2*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-3*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-4*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-5*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-6*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-7*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-8*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-9*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-1*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-2*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-3*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-4*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-5*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-6*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-7*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-8*.bmp")
# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-9*.bmp")
os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-H*.bmp")

# os.system("/Users/admin/Downloads/potrace-1.16.mac-x86_64/potrace --svg ../output/fine/-H13-255_3941_238_197.bmp")
Expand Down
11 changes: 8 additions & 3 deletions workflow/stage_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@
t = 0
for f in glob("../output/fine/*.svg"):
bname = f.split("/")[-1]
t += tweak[bname]['scale']
try:
t += tweak[bname]['scale']
except:
t += 1
n+=1

avgsc = int((1/(t/n))*10000)/10000


for f in glob("../output/fine/*.svg"):
bname = f.split("/")[-1]
t = tweak[bname]

try:
t = tweak[bname]
except:
t = {'x':0,'y':0,'scale':1,'rotate':0}
gstr = f'<g transform="translate(256,256) translate({t["x"]},{t["y"]}) scale({t["scale"]*avgsc}) rotate({t["rotate"]}) translate(-256,-256)">'

s = open(f,'r').read()
Expand Down

0 comments on commit 742529c

Please sign in to comment.