国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集

這篇具有很好參考價(jià)值的文章主要介紹了計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

這是一個(gè)手機(jī)目標(biāo)檢測(cè)的數(shù)據(jù)集,數(shù)據(jù)集的標(biāo)注工具是labelimg,數(shù)據(jù)格式是voc格式,要訓(xùn)練yolo模型的話,可以使用腳本改成txt格式,數(shù)據(jù)集標(biāo)注了手機(jī),標(biāo)簽名:telephone,數(shù)據(jù)集總共有1960張,有一部分是直實(shí)數(shù)據(jù),有一部分是是真實(shí)數(shù)據(jù)。
數(shù)據(jù)集地址:https://download.csdn.net/download/matt45m/89136478

數(shù)據(jù)標(biāo)注如下:
計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集,計(jì)算機(jī)視覺(jué),計(jì)算機(jī)視覺(jué),目標(biāo)檢測(cè),手機(jī),手機(jī)目標(biāo)檢測(cè),數(shù)據(jù)集

計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集,計(jì)算機(jī)視覺(jué),計(jì)算機(jī)視覺(jué),目標(biāo)檢測(cè),手機(jī),手機(jī)目標(biāo)檢測(cè),數(shù)據(jù)集

計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集,計(jì)算機(jī)視覺(jué),計(jì)算機(jī)視覺(jué),目標(biāo)檢測(cè),手機(jī),手機(jī)目標(biāo)檢測(cè),數(shù)據(jù)集
數(shù)據(jù)保存目錄如下:
計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集,計(jì)算機(jī)視覺(jué),計(jì)算機(jī)視覺(jué),目標(biāo)檢測(cè),手機(jī),手機(jī)目標(biāo)檢測(cè),數(shù)據(jù)集
xml標(biāo)簽文件:

<annotation>
<folder>JPEGImages</folder>
<filename>bs001783.jpg</filename>
<path>JPEGImages\bs001783.jpg</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>1920</width>
<height>1080</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>telephone</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>1058</xmin>
<ymin>936</ymin>
<xmax>1123</xmax>
<ymax>977</ymax>
</bndbox>
</object>
</annotation>

python代碼實(shí)現(xiàn)可視化:文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-852042.html

import xml.etree.ElementTree as ET
import os
import cv2

# ******************************************
src_XML_dir = r'labels'  # xml源路徑
src_IMG_dir = r'images'  # IMG原路徑
IMG_format = '.jpg'    # IMG格式
out_dir = 'out'  # 輸出路徑
# ******************************************

if not os.path.exists(out_dir):
    os.makedirs(out_dir)
xml_file = os.listdir(src_XML_dir)  # 只返回文件名稱,帶后綴

for each_XML in xml_file:  # 遍歷所有xml文件
    # 讀入IMG
    xml_FirstName = os.path.splitext(each_XML)[0]
    img_save_file = os.path.join(out_dir, xml_FirstName+IMG_format)
    img_src_path = os.path.join(src_IMG_dir, xml_FirstName+IMG_format)
    img = cv2.imread(img_src_path)
    # 解析XML
    each_XML_fullPath = src_XML_dir + '/' + each_XML  # 每個(gè)xml文件的完整路徑
    tree = ET.parse(each_XML_fullPath)  # ET.parse()內(nèi)要為完整相對(duì)路徑
    root = tree.getroot()  # 類型為element

    # 畫(huà)框
    for obj in root.findall('object'):
        if obj.find('bndbox'):
            bndbox = obj.find('bndbox')
            xmin = int(bndbox.find('xmin').text)
            xmax = int(bndbox.find('xmax').text)
            ymin = int(bndbox.find('ymin').text)
            ymax = int(bndbox.find('ymax').text)

            cv2.rectangle(img=img,
                          pt1=(xmin,ymin),
                          pt2=(xmax,ymax),
                          color=(255,0,0),
                          thickness=2)

    cv2.imwrite(filename=img_save_file, img=img)
    print('保存結(jié)果{}'.format(xml_FirstName))

到了這里,關(guān)于計(jì)算機(jī)視覺(jué)——手機(jī)目標(biāo)檢測(cè)數(shù)據(jù)集的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包