Closed crazy-abc closed 5 years ago
Hello, thank you for your interest in our work! This is an automated response. Please note that most technical problems are due to:
git clone
version of this repository we can not debug it. Before going further run this code and ensure your issue persists:
sudo rm -rf yolov3 # remove exising repo
git clone https://github.com/ultralytics/yolov3 && cd yolov3 # git clone latest
python3 detect.py # verify detection
python3 train.py # verify training (a few batches only)
# CODE TO REPRODUCE YOUR ISSUE HERE
train_batch0.jpg
and test_batch0.jpg
for a sanity check of training and testing data.If none of these apply to you, we suggest you close this issue and raise a new one using the Bug Report template, providing screenshots and minimum viable code to reproduce your issue. Thank you!
I have the same problem. Please first check if the labels are empty.Chances are that the TXT file in labels is empty
@pprp thank you for the input! Ensure the labels in your TXT file are correctly formatted as [class xywh]
for each object instance in the image. You can also verify if your labels are empty or not by checking the content of your label files directly. If the issue persists, feel free to share further details or consider the suggestions outlined in my previous message.
E:\pyProject\yolov3>python train.py --data data/coco_1cls.data Namespace(accumulate=1, backend='nccl', batch_size=16, cfg='cfg/yolov3-spp.cfg', data_cfg='data/coco_1cls.data', dist_url='tcp://127.0.0.1:9999', epochs=273, evolve=False, img_size=416, multi_scale=False, nosave=False, notest=False, num_workers=2, rank=0, resume=False, transfer=False, var=0, world_size=1)
Using CUDA device0 _CudaDeviceProperties(name='GeForce GTX 750 Ti', total_memory=4096MB) Traceback (most recent call last): File "train.py", line 313, in
multi_scale=opt.multi_scale,
File "train.py", line 150, in train
model.class_weights = labels_to_class_weights(dataset.labels, nc).to(device) # attach class weights
File "E:\pyProject\yolov3\utils\utils.py", line 55, in labels_to_class_weights
classes = labels[:, 0].astype(np.int) # labels = [class xywh]
IndexError: too many indices for array
how should i do?