资源简介
yolo 中文标签 .py 和所需的ukai.ttc字体。通过.py 在命令行执行。
代码片段和文件信息
import os
import string
import pipes
font = ‘H:\\deeplearning\\yolov2\\darknet-masterv2\\darknet-master\\build\\darknet\\x64\\data\\labels\\ukai.ttc‘ # ‘futura-normal‘
def make_labels(s):
l = [‘车‘]
for word in l:
# if word == ‘ ‘:
# os.system(‘convert -fill black -background white -bordercolor white -font %s -pointsize %d label:“\ “ 32_%d.png‘%(fontss/12-1))
# if word == ‘@‘:
# os.system(‘convert -fill black -background white -bordercolor white -font %s -pointsize %d label:“\@“ 64_%d.png‘%(fontss/12-1))
# elif word == ‘\\‘:
# os.system(‘convert -fill black -background white -bordercolor white -font %s -pointsize %d label:“\\\\\\\\“ 92_%d.png‘%(fontss/12-1))
# elif ord(word) in [91011121314]:
# pass
# else:
# os.system(“convert -fill black -background white -bordercolor white -font %s -pointsize %d label:%s \“%d_%d.png\““%(fontspipes.quote(word) ord(word)s/12-1))
os.system(“convert -fill black -background white -bordercolor white -border 4 -font %s -pointsize %d label:\“%s\“ \“che_%d_%d.png\““%(fontswordis/12-1))
for i in [1224364860728496]:
make_labels(i)
import os
import string
import pipes
font = ‘H:\\deeplearning\\yolov2\\darknet-masterv2\\darknet-master\\build\\darknet\\x64\\data\\labels\\ukai.ttc‘ # ‘futura-normal‘
def make_labels(s):
l=[“人““自行车““车““摩托车““飞机““大巴““火车““卡车““船““交通灯““消防栓““停止标识““停车计时器““长凳““鸟““猫““狗““马““羊““牛““大象““熊““斑马““长颈鹿““背包““伞““手提包““领带““手提箱““飞盘““雪橇““滑雪板““体育用球““风筝““棒球棒““棒球手套““滑板““冲浪板““网球拍““瓶子““红酒杯““杯子““叉子““小刀““勺子““碗““香蕉““苹果““三明治““橘子““西兰花““萝卜““热狗““披萨““甜甜圈““蛋糕““椅子““沙发““盆栽““床““餐桌““厕所““显示器““笔记本““鼠标““遥控““键盘““手机““微波炉““烤箱““吐司机““水槽““冰箱““书““闹钟““花瓶““剪刀““泰迪熊““吹风机““牙刷“]
#l= [“人““自行车“]
def make_labels(s):
i = 0
for word in l:
os.system(“convert -fill black -background white -bordercolor white -border 4 -font /usr/share/fonts/wqy-microhei/wqy-microhei.ttc -pointsize %d label:\“%s\“ \“cn_%d_%d.png\““%(swordis/12-1))
i = i + 1
for i in [1224364860728496]:
make_labels(i)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2540 2018-04-15 22:50 make_labels.py
文件 17151049 2018-04-15 19:11 ukai.ttc
- 上一篇:C_STL中文版.zip
- 下一篇:机械设计基础轴系改错题
评论
共有 条评论