Dataset '{}' is empty! Error (While train custom dataset on detectron2) #5093
Unanswered
MuharremcanGulye
asked this question in
Q&A
Replies: 1 comment
-
This is an error I am having as well.....Training dataset loads fine, iterates through the epochs.....No such luck with validation dataset. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
First of all i am almost a newbie.
I am trying to train a model that detects objects on Detectron2.
Problem is all my annotations are csv format and im trying to convert them proper format.
Im trying to imitate baloon detection tutorial.
Here is my code,
import numpy as np
import os, json, cv2, random
import pandas as pd
import cv2
def getdict(path):
files = os.listdir(path)
categories = {'cat1':1, 'cat2: 2, 'cat3':3 }
for file in files:
image_id = int(file.split(".")[0])
dataset_dicts = []
if file[-4:] == '.jpg':
record = {}
getdict("/content/drive/MyDrive/test1/")
The error that i get is down below.
/content/detectron2/detectron2/data/build.py in get_detection_dataset_dicts(names, filter_empty, min_keypoints, proposal_files, check_consistency)
262
263 for dataset_name, dicts in zip(names, dataset_dicts):
--> 264 assert len(dicts), "Dataset '{}' is empty!".format(dataset_name)
265
266 if proposal_files is not None:
TypeError: object of type 'NoneType' has no len()
I think i am doing something wrong with creating dataset_dicts but i coudnt find what is wrong.
Thanks and regards.
Beta Was this translation helpful? Give feedback.
All reactions