JKBox / YOLOv3-quadrangle

YOLOv3 detector with quadrangle in PyTorch
88 stars 29 forks source link

Problem with train #16

Open nafe93 opened 3 years ago

nafe93 commented 3 years ago

I get the problem with train line 177, in __next__ img_all = np.stack(img_all)[:, :, :, ::-1].transpose(0, 3, 1, 2) File "<__array_function__ internals>", line 6, in stack

I create YOLOv3-quadrangle/Dataset/train and inside the path I create two folders images and labels_cocoformat the labels have names with gt, inside Datasets i also create train.part and inside it i save image name without ".jpg"

example train.part img1 img2

image size 1000 * 1000 and rgb

vineeth357 commented 3 years ago

you need to change these lines in dataset.py file:

self.imgfiles = [path.replace('\n', '').replace('/images', './Dataset/images').replace('gt', '').replace('.png', '.jpg') for path in self.img_files] self.labelfiles = [path.replace('images/', 'labels/gt').replace('.png', '.txt').replace('.jpg', '.txt') for path in self.img_files]