資源簡介
火焰圖集合和訓練好的yolo_tiny火焰檢測weights,經過處理成voc數據集,而且經過訓練,可以實現yolo-tiny的圖像檢測。
代碼片段和文件信息
import?os
import?random
trainval_percent?=?0.1
train_percent?=?0.9
xmlfilepath?=?‘Annotations‘
txtsavepath?=?‘ImageSets\Main‘
total_xml?=?os.listdir(xmlfilepath)
num?=?len(total_xml)
list?=?range(num)
tv?=?int(num?*?trainval_percent)
tr?=?int(tv?*?train_percent)
trainval?=?random.sample(list?tv)
train?=?random.sample(trainval?tr)
ftrainval?=?open(‘ImageSets/Main/trainval.txt‘?‘w‘)
ftest?=?open(‘ImageSets/Main/test.txt‘?‘w‘)
ftrain?=?open(‘ImageSets/Main/train.txt‘?‘w‘)
fval?=?open(‘ImageSets/Main/val.txt‘?‘w‘)
for?i?in?list:
????name?=?total_xml[i][:-4]?+?‘\n‘
????if?i?in?trainval:
????????ftrainval.write(name)
????????if?i?in?train:
????????????ftest.write(name)
????????else:
????????????fval.write(name)
????else:
????????ftrain.write(name)
ftrainval.close()
ftrain.close()
fval.close()
ftest.close()
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????34805224??2019-05-05?18:27??trained_weights_final.h5
?????目錄???????????0??2019-04-25?07:53??VOCdevkit\
?????目錄???????????0??2019-04-29?10:07??VOCdevkit\VOC2007\
?????目錄???????????0??2019-05-05?16:49??VOCdevkit\VOC2007\Annotations\
?????文件????????1192??2019-05-05?15:54??VOCdevkit\VOC2007\Annotations\000001.xm
?????文件?????????751??2019-05-05?15:54??VOCdevkit\VOC2007\Annotations\000002.xm
?????文件?????????529??2019-05-05?15:54??VOCdevkit\VOC2007\Annotations\000003.xm
?????文件?????????754??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000004.xm
?????文件?????????529??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000005.xm
?????文件?????????530??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000006.xm
?????文件?????????529??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000007.xm
?????文件?????????527??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000008.xm
?????文件?????????531??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000009.xm
?????文件?????????980??2019-05-05?15:55??VOCdevkit\VOC2007\Annotations\000010.xm
?????文件?????????978??2019-05-05?15:56??VOCdevkit\VOC2007\Annotations\000011.xm
?????文件?????????980??2019-05-05?15:56??VOCdevkit\VOC2007\Annotations\000012.xm
?????文件?????????528??2019-05-05?15:56??VOCdevkit\VOC2007\Annotations\000013.xm
?????文件????????1205??2019-05-05?15:56??VOCdevkit\VOC2007\Annotations\000014.xm
?????文件?????????530??2019-05-05?15:57??VOCdevkit\VOC2007\Annotations\000015.xm
?????文件?????????529??2019-05-05?15:57??VOCdevkit\VOC2007\Annotations\000016.xm
?????文件?????????529??2019-05-05?15:57??VOCdevkit\VOC2007\Annotations\000017.xm
?????文件?????????754??2019-05-05?15:57??VOCdevkit\VOC2007\Annotations\000018.xm
?????文件?????????529??2019-05-05?15:57??VOCdevkit\VOC2007\Annotations\000019.xm
?????文件?????????529??2019-05-05?15:57??VOCdevkit\VOC2007\Annotations\000020.xm
?????文件?????????990??2019-05-05?15:58??VOCdevkit\VOC2007\Annotations\000021.xm
?????文件?????????754??2019-05-05?15:58??VOCdevkit\VOC2007\Annotations\000022.xm
?????文件?????????529??2019-05-05?15:58??VOCdevkit\VOC2007\Annotations\000023.xm
?????文件?????????529??2019-05-05?15:58??VOCdevkit\VOC2007\Annotations\000024.xm
?????文件?????????528??2019-05-05?15:58??VOCdevkit\VOC2007\Annotations\000025.xm
?????文件?????????528??2019-05-05?15:58??VOCdevkit\VOC2007\Annotations\000026.xm
?????文件?????????749??2019-05-05?15:59??VOCdevkit\VOC2007\Annotations\000027.xm
............此處省略1062個文件信息
評論
共有 條評論