mirror of https://github.com/AlexeyAB/darknet.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
940 B
23 lines
940 B
import os |
|
import string |
|
import pipes |
|
|
|
font = 'futura-normal' |
|
|
|
def make_labels(s): |
|
l = string.printable |
|
for word in l: |
|
if word == ' ': |
|
os.system('convert -fill black -background white -bordercolor white -font %s -pointsize %d label:"\ " 32_%d.png'%(font,s,s/12-1)) |
|
if word == '@': |
|
os.system('convert -fill black -background white -bordercolor white -font %s -pointsize %d label:"\@" 64_%d.png'%(font,s,s/12-1)) |
|
elif word == '\\': |
|
os.system('convert -fill black -background white -bordercolor white -font %s -pointsize %d label:"\\\\\\\\" 92_%d.png'%(font,s,s/12-1)) |
|
elif ord(word) in [9,10,11,12,13,14]: |
|
pass |
|
else: |
|
os.system("convert -fill black -background white -bordercolor white -font %s -pointsize %d label:%s \"%d_%d.png\""%(font,s,pipes.quote(word), ord(word),s/12-1)) |
|
|
|
for i in [12,24,36,48,60,72,84,96]: |
|
make_labels(i) |
|
|
|
|