YuHengsss / YOLOV

This repo is an implementation of PyTorch version YOLOV Series
Apache License 2.0
278 stars 39 forks source link

AttributeError: 'MosaicDetection_VID' object has no attribute 'dataset_pth' #41

Closed HwaiHo-0552 closed 1 year ago

HwaiHo-0552 commented 1 year ago

!! Iteration after 3 epoch. !! Running for yolov_x stopped. !!

But, following the bottom structure could smoothly running for yolov_s. pytorch 1.20, cuda 11.6.

The 'AttributeError' seems to related the path of dataset ? I am not sure. But, running for yolov_s is OK. Does anyone here could give a help ? Thank you so much.

HwaiHo-0552 commented 1 year ago

I checked ./exps/yolov_x.py

I saw these code.
dataset = vid.VIDDataset(file_path='./yolox/data/datasets/train_seq.npy', img_size=self.input_size, preproc=TrainTransform( max_labels=50, flip_prob=self.flip_prob, hsv_prob=self.hsv_prob), lframe=0, # batch_size, gframe=batch_size, dataset_pth=self.data_dir)

For the "train_seq.npy", I had put it as author's guide before running.

HwaiHo-0552 commented 1 year ago

I solved this issue. line 281 self.dataset_path = dataset_path in mosaicdetection.py.

if you want to train yolov_x.py, please modify this line as self.dataset_path = dataset_path --> self.dataset_pth = dataset_path.

OK!! checking code carefully!

YuHengsss commented 1 year ago

I solved this issue. line 281 self.dataset_path = dataset_path in mosaicdetection.py.

if you want to train yolov_x.py, please modify this line as self.dataset_path = dataset_path --> self.dataset_pth = dataset_path.

OK!! checking code carefully!

Sorry for my poor code and thanks for your debugging. Best wishes.