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

一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.

這篇具有很好參考價值的文章主要介紹了一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

問題描述:

使用YOLOv5在訓(xùn)練自己的數(shù)據(jù)集時,運行【trian.py】文件時,出現(xiàn)了下面的報錯:

一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.

主要提示為:

AssertionError: train: No labels in /data_1T/xd1/yolov5-6.1/datasets/VOC_To_YOLO/train.cache. Can not train without labels. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data


問題解決

這是因為【datasets.py】中的圖片路徑設(shè)置的不對

解決方案如下:

1.打開【datasets.py】。【datasets.py】一般在【utils】文件下。如圖:一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.

2.打開之后,按【Ctrl】+【F】打開搜索功能,輸入【Define label?】找到下面的一行內(nèi)容:一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.?3.去看你圖片的圖片路徑。例如,我的訓(xùn)練圖片放在了這個位置:

一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.

?路徑為:xx/xx/yolov5-6.1/datasets/VOC_To_YOLO/JPEGImages

4.修改【datasets.py】。需要把【JPEGImages】替換掉【datasets.py】里面的這個位置:一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.

?最后的效果為:

一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.

5.保存剛才的修改操作?

6.再次運行【trian.py】,問題解決!文章來源地址http://www.zghlxwxcb.cn/news/detail-506539.html


到這,就已經(jīng)解決了問題。歡迎關(guān)注藍(lán)胖胖,咱們一起解決BUG~~~

到了這里,關(guān)于一步真實解決AssertionError: train: No labels in /xxx/xxx/xxx/datasets/VOC_To_YOLO/train.cache.的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

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

相關(guān)文章

  • yolov5數(shù)據(jù)讀取報錯:train: No labels found in /root/yolov5-master/VOCData/dataSet_path/train.cache

    yolov5數(shù)據(jù)讀取報錯:train: No labels found in /root/yolov5-master/VOCData/dataSet_path/train.cache

    這個問題是由于路徑設(shè)置錯誤導(dǎo)致的,以下幾個文件的路徑都要保持一致。 (1)yolov5-master/VOCData/xml_to_yolo.py 這個文件是將xml格式的label轉(zhuǎn)為txt格式,這個地方建議直接改為絕對路徑。 ?(2)yolov5-mastertrain.py train文件里面的ROOT也需要改為yolov5-master所在路徑,后續(xù)代碼都使用

    2024年02月13日
    瀏覽(26)
  • 訓(xùn)練yolov5的那些事之解決:AssertionError: Label class x exceeds nc=x in data/yolov5.yaml. Possible class label

    Yolov5報錯: AssertionError: Label class x exceeds nc=x in data/yolov5.yaml. Possible class labels are 0-x-1 File “C:Users1Desktop水表識別YOLO5yolov5-mastertrain.py”, line 175, in train assert mlc nc, ‘Label class %g exceeds nc=%g in %s. Possible class labels are 0-%g’ % (mlc, nc, opt.data, nc - 1) 找到train文件的175行: 改成這樣

    2024年02月11日
    瀏覽(162)
  • YOLOv5報錯AssertionError:Label class 1 exceeds nc=1 in yolo/dataset.ymal Possible class labels are 0-0

    YOLOv5報錯AssertionError:Label class 1 exceeds nc=1 in yolo/dataset.ymal Possible class labels are 0-0

    新手小白最近在學(xué)習(xí)yolov5進(jìn)行檢測,記錄一下自己在環(huán)境搭建及和程序運行中所遇到的問題及解決方法。可能不是解決問題最好的一種可以給一個參考,有其他的解決方法可以麻煩指出來,謝謝。 問題一:在運行train.py(只有1類)程序過程中出現(xiàn)“AssertionError:Label class 1 exc

    2024年02月13日
    瀏覽(22)
  • 一步真實解決AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘

    一步真實解決AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘

    你是不是在Pycharm等編譯器和Colab等服務(wù)器上 運行yolov5的detect.py 出現(xiàn)下面的這個問題 那么我們跟著錯誤去上面的提示信息找方法 可以發(fā)現(xiàn)是關(guān)于\\\"Upsample“和 \\\'recompute_scale_factor\\\',相關(guān)的提示是在這里 緊接著 ,按著提示文件路徑一步一步的打開usampling.py,找到第155行附近 這是發(fā)現(xiàn)

    2024年02月02日
    瀏覽(18)
  • 已解決No artists with labels found to put in legend. Note that artists whose label start with an under

    已解決No artists with labels found to put in legend. Note that artists whose label start with an under

    已解決No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument. 粉絲群里面的一個小伙伴遇到問題跑來私信我,想用matplotlib繪圖,但是發(fā)生了報錯(當(dāng)時他心里瞬間涼了一大截,跑來找我求助,然后順利幫助他解決

    2024年02月02日
    瀏覽(39)
  • 解決linux環(huán)境下no XXX in java.library.path問題

    最近開發(fā)一個結(jié)合??禂z像頭的sdk項目,真是狗。遇到一個問題,在windows上能跑,在linux上就一直跑不起來。 首先發(fā)現(xiàn)在windows上裝了??档囊粋€叫MvCamera的軟件,所以系統(tǒng)中是有dll文件的。于是筆者就在linux上也下載了這個軟件。 當(dāng)然他是一個壓縮包。解壓后我放到了/usr/

    2024年02月06日
    瀏覽(19)
  • 解決Linux部署報錯No main manifest attribute, in XXX.jar

    解決Linux部署報錯No main manifest attribute, in XXX.jar

    這是我近期遇到的一個問題,報錯原因就是沒找到主類,首先你在你本地運行,本地運行ok的話,解壓生成的jar包,里面有個 META-INF 文件,打開 MANIFEST.MF 文件, 該文件是一個清單文件。該文件包含有關(guān)JAR文件中的內(nèi)容的信息,包括入口點,。找主類(main方法的類)就是去這個文

    2024年04月28日
    瀏覽(17)
  • Mybatis報錯:There is no getter for property named ‘xxx‘ in ‘class xxx 的解決辦法

    在mybatis中遇到這樣的報錯,There is no getter for property named ‘xxx’ in \\\'class xxx ,這篇博客給出了解決辦法。 There is no getter for property named ‘username’ in ‘class com.zxy.pojo.User’ 最先想著是不是User實體類沒有寫 Getter and Setter 方法,可是發(fā)現(xiàn)寫了。 發(fā)現(xiàn)數(shù)據(jù)庫表字段 category_id 與實體

    2024年02月03日
    瀏覽(20)
  • Dockerfile: unable to find user xxx : no matching entries in passwd file解決方案

    在制作Docker鏡像的過程中,完成軟件安裝等操作后,一般會切換為普通用戶啟動相應(yīng)的服務(wù),就需要用到 USER 指令。但有時候這個指令會報錯: docker: Error response from daemon: unable to find user : no matching entries in passwd file. 如果遇到這個問題,可以在使用 USER 指令之前,先創(chuàng)建用戶

    2024年02月09日
    瀏覽(44)
  • There is no getter for property named ‘xxx‘ in ‘class java.lang.xxxx‘解決辦法

    There is no getter for property named ‘xxx‘ in ‘class java.lang.xxxx‘解決辦法

    報錯最前面 內(nèi)容 報錯原因: 使用了自定義SQL,可能含有特殊的函數(shù)或者復(fù)雜的語法,因而不被JSqlParser(SQL解析器)所支持(無法添加租戶id之類的字段),以致拋出了JSQLParserException。 解決方法: Failed to process, please exclude the tableName or statementId 翻譯過來就是:處理失敗,請將表名

    2024年02月04日
    瀏覽(34)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包