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

mmdetection ValueError: need at least one array to concatenate解決方案

這篇具有很好參考價值的文章主要介紹了mmdetection ValueError: need at least one array to concatenate解決方案。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報違法"按鈕提交疑問。

在mmdetection中有時候訓(xùn)練模型會出現(xiàn)ValueError: need at least one array to concatenate的錯誤,詳情如下圖所示。

mmdetection ValueError: need at least one array to concatenate解決方案

很多人都說是mmdet/dataset下coco.py或voc.py中CLASSES設(shè)置與數(shù)據(jù)集對應(yīng)不上,博主不以為然。因為在mmdetection2中,不需要到mmdet/dataset中修改CLASSES,只需要在訓(xùn)練配置文件中中設(shè)置一下就行了。config解釋器會通過繼承自動修改CLASSES的值,具體可見下圖,或參考mmdetection2的使用教程從數(shù)據(jù)處理、配置文件到訓(xùn)練與測試(支持coco數(shù)據(jù)和pascal_voc數(shù)據(jù))_萬里鵬程轉(zhuǎn)瞬至的博客-CSDN博客_mmdetection2https://hpg123.blog.csdn.net/article/details/124617894

mmdetection ValueError: need at least one array to concatenate解決方案

?只要配置文件中classes設(shè)置正確了,voc數(shù)據(jù)就不會出現(xiàn)上述的報錯。

但是,coco數(shù)據(jù)集會因此數(shù)據(jù)轉(zhuǎn)化時設(shè)置有誤,而導(dǎo)致出現(xiàn)上述錯誤。博主的數(shù)據(jù)集只有shoot一個類別,在數(shù)據(jù)集轉(zhuǎn)換時,通過下列方式在tools\dataset_converters\pascal_voc.py文件設(shè)置類別。【錯誤方式】mmdetection ValueError: need at least one array to concatenate解決方案

?然后生成的coco數(shù)據(jù)存在問題,本來只有一個shoot類別的coco數(shù)據(jù),結(jié)果出現(xiàn)了?20余個supercategory項目。這就是導(dǎo)致報錯的根源。

mmdetection ValueError: need at least one array to concatenate解決方案

在轉(zhuǎn)換數(shù)據(jù)集時,需要通過在tools\dataset_converters\pascal_voc.py文件按照以下標(biāo)準(zhǔn)以下設(shè)置修改自定義類別

mmdetection ValueError: need at least one array to concatenate解決方案?通過該方式生成的coco數(shù)據(jù)集才是嚴(yán)格正確的,其categories的格式如下圖所示。如果是通過第三方項目生成的coco數(shù)據(jù),則請檢查categories內(nèi)的數(shù)據(jù)與數(shù)據(jù)集的類別是否正常。mmdetection ValueError: need at least one array to concatenate解決方案

?在修改coco數(shù)據(jù)集的錯誤后,現(xiàn)在mmdetection可以正常訓(xùn)練數(shù)據(jù)了。

mmdetection ValueError: need at least one array to concatenate解決方案

?文章來源地址http://www.zghlxwxcb.cn/news/detail-410371.html

到了這里,關(guān)于mmdetection ValueError: need at least one array to concatenate解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

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

相關(guān)文章

  • SparkException: Dynamic partition strict mode requires at least one static partition column

    SparkException: Dynamic partition strict mode requires at least one static partition column

    創(chuàng)建表后卻無法寫入數(shù)據(jù)? 報錯內(nèi)容:== Exception in thread “main” org.apache.spark.SparkException: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict at org.apache.spark.sql.hive.execution.InsertIntoHiveTable.processInsert(InsertIntoHiveTable.scala:1

    2024年04月11日
    瀏覽(27)
  • At least one <template> or <script> is required in a single file component.

    At least one <template> or <script> is required in a single file component.

    新建了一個vue3項目引入路由的時候報這個語法錯誤,檢查版本什么都沒問題寫法也對,看字面意思是解析不了template 沒細(xì)想就下了一個template解釋器?npm i vue-template-compiler 然而無事發(fā)生 糾結(jié)了一下想起來我引入的一個路由的文件(vue文件)因為新建還沒有寫html部分也就是個

    2024年02月11日
    瀏覽(26)
  • FPGA編譯報錯內(nèi)容[Common 17-55] ‘set_property‘ expects at least one object.

    FPGA代碼編譯時報錯 編譯報錯內(nèi)容[Common 17-55] ‘set_property’ expects at least one object. 當(dāng)一個引腳存在于xdc文件中,但是工程的頂層模塊的引腳里沒有這個引腳時,就會報出這個錯誤 查找報錯的這個引腳是否存在于工程的頂層模塊的引腳列表中, 最大的可能是xdc中的引腳名與工程

    2024年02月07日
    瀏覽(18)
  • ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.al

    這個錯誤通常發(fā)生在你在使用numpy數(shù)組作為if語句的條件時。在這種情況下,Python會嘗試使用該數(shù)組中的所有元素來確定if語句的真假。由于numpy數(shù)組可能包含多個元素,因此Python會拋出ValueError錯誤,因為它不知道如何處理多個元素的數(shù)組。 解決方法就是使用 a.all() or a.any() 替

    2024年02月16日
    瀏覽(26)
  • 【Python】成功解決ValueError: zero-size array to reduction operation minimum which has no identity

    【Python】成功解決ValueError: zero-size array to reduction operation minimum which has no identity

    【Python】成功解決ValueError: zero-size array to reduction operation minimum which has no identity ?? 個人主頁:高斯小哥 ?? 高質(zhì)量專欄:Matplotlib之旅:零基礎(chǔ)精通數(shù)據(jù)可視化、Python基礎(chǔ)【高質(zhì)量合集】、PyTorch零基礎(chǔ)入門教程?? 希望得到您的訂閱和支持~ ?? 創(chuàng)作高質(zhì)量博文(平均質(zhì)量分9

    2024年04月16日
    瀏覽(32)
  • LeetCode --- 1929. Concatenation of Array 解題報告

    Given an integer array? nums ?of length? n , you want to create an array? ans ?of length? 2n ?where? ans[i] == nums[i] ?and? ans[i + n] == nums[i] ?for? 0 = i n ?( 0-indexed ). Specifically,? ans ?is the? concatenation ?of two? nums ?arrays. Return? the array? ans . Example 1: Example 2:

    2024年02月09日
    瀏覽(25)
  • elastic安裝報錯:max file descriptors [4096] for elasticsearch process is too low, increase to at least

    elastic安裝報錯:max file descriptors [4096] for elasticsearch process is too low, increase to at least

    一、現(xiàn)象 因為 es 不允許使用root用戶安裝,在使用新建的es用戶安裝的時候報錯如下, max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] 二、解決辦法 將當(dāng)前用戶的軟硬限制調(diào)大。找到文件 /etc/security/limits.conf ,編輯,在文件的最后追加如下配置: ?

    2024年02月11日
    瀏覽(26)
  • python報錯ValueError: zero-size array to reduction operation maximum which has no identity,情況之一分析與解決

    在boston房價數(shù)據(jù)預(yù)測練習(xí)項目中,發(fā)現(xiàn)報錯如下: ValueError: zero-size array to reduction operation maximum which has no identity 此報錯所對應(yīng)行為 于是網(wǎng)上查找對應(yīng)錯誤解決方法,有的博主的numpy數(shù)組處array.max(axis=0)、array.min(axis=0),的確有數(shù)組為0的情況,采納其建議加入assert array.size !=

    2024年02月08日
    瀏覽(23)
  • 【Error】max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    【Error】max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/log/my-es.lo

    2024年02月06日
    瀏覽(20)
  • 安裝es報錯: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    安裝es報錯: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    啟動es時報錯 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 解決: 原因:最大虛擬內(nèi)存值設(shè)置過小,無法支持ElasticSearch的運(yùn)行。 將 vm.max_map_count 的值改為262144,重新啟動即可解決問題。

    2024年02月15日
    瀏覽(24)

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

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

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

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包