Customize Dataset

電腦環境 : Win10 、mmcv-full版本 : 1.5.0、torch 版本 : 1.12.1

按照Tutorial 3 : Customize Dataset其中的 2.The sample images are arranged in the special structure: 操作,欲將自己的資料集新增進去,並且訓練模型。

以下是新增的程式碼檔案

新增以後執行以下指令開始訓練模型:

python tools/train.py configs/regnet/regnetx-400mf_8xb128_in1k.py

出現以下錯誤訊息:

錯誤訊息 : ValueError: CustomDataset: not enough values to unpack (expected 2, got 1)


嘗試了下列幾種方法都沒辦法成功Debug。

1. 去Data裡面刪資料

2. 在程式碼裡面刪除一個回傳的參數

3. 欲在程式碼裡面新稱一個參數讓它可以接收,卻不知道該從哪裡新增。

請問該如何解決?


以下幾點想詢問

1. 上面第一張圖裡面紅線標註地方提到 : And in your config file, you can modify the data field as below:

那段程式碼在許多py檔裡面都有出現,請問是要修改哪一個? 或是要自己新增一段?(目前採用此法)

2. Tutorial 3 : Customize Dataset 裡面提到三種方法 :

1. 將自有的資料集分類好新增到mmclassification底下後直接修改configs檔案

2. 新增Filelist來加載數據

3. Use dataset wrapper

請問是三種方法選擇一種做 ? 還是三種方法是連貫的,都需要做 ?

Comments

The discussion has been closed due to inactivity. To continue with the topic, please feel free to post a new discussion.