ecr23xx / yolov3.pytorch

PyTorch implmenetation of YOLO v3, including training and testing, and can be adapted for user-defined dataset
31 stars 14 forks source link

Training with COCO - loss is missing #3

Open esrasiler opened 5 years ago

esrasiler commented 5 years ago

When I'm trying train coco dataset, I'm getting error code below: Traceback (most recent call last): File "train.py", line 107, in <module> train(epoch, train_dataloader, yolo, optimizer) File "train.py", line 61, in train loss = yolo(inputs, targets) File "C:\Users\username\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\username\Desktop\username\yolov3.pytorch-master\src\model.py", line 175, in forward for key, value in loss_part.items(): Attr

When I investigate code, at Detection layer, y_true is not used and there is not return for loss.

Is loss function available?

ecr23xx commented 5 years ago

I'm still modifying the loss function because I can't reproduce the result. So it's possible that some code couldn't run normally.

You can checkout to previous commits, in which the training code could run. But it can't make reasonable predictions.

If you want to train YOLOv3 on COCO or on your custom datasets, Alexey/darknet is recommended. It has clear instructions and can get good results.