Giter Club home page Giter Club logo

Comments (27)

wushuang01 avatar wushuang01 commented on July 27, 2024 1

@RebornL I change the dataloader for VOCdataset and then change the yolov3.cfg for 20 classes in VOC.

from pytorch-yolov3.

ludovic-carre avatar ludovic-carre commented on July 27, 2024 1

I used a training pipeline similar to the one in this repo and got a mAP of 0.47 when traning on VOC using the latest mAP evaluation module in the repo. Can you give more information about you mean when you say you don't have good results ? I suspect the mAP module to not be exactly correct since the visualization of my results don't "feel" like 0.47 mAP to me, maybe more a 0.30 or something.

from pytorch-yolov3.

wushuang01 avatar wushuang01 commented on July 27, 2024 1

@RebornL I take some reference from the pull requests.

from pytorch-yolov3.

wushuang01 avatar wushuang01 commented on July 27, 2024 1

@feifeiwei I use the func: save_weights to save my model parameters on the first,but when I test the model on test images,it can't detect anything.Then I change the way of saving weights,using torch.save(model.state_dict()). After doing that it can detect some objects but mAP is not good after 100 epochs.So I use the pretrained model and it seems working.There may be a bug on saving_weights function but I havn't figured it out,if you can find something please tell me.Thanks!

from pytorch-yolov3.

Pythonisfun avatar Pythonisfun commented on July 27, 2024

can you share the code?thanks.

from pytorch-yolov3.

 avatar commented on July 27, 2024

Me too!! I have tried yolov3.cfg and yolov3-voc.cfg in the experiments. They could not achieve the good results as the paper. The other question is that the performance of yolov3.cfg is better than yolov3-voc.cfg on VOC2007, though it has 80 classes.

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

hello,I want to ask how to train on VOC2007 dataset

from pytorch-yolov3.

wushuang01 avatar wushuang01 commented on July 27, 2024

I have met the same problem when training on VOC.I have trained it for 90 epochs but the confindece of the ture object is very low.Does anyone have a same problem and fix it? thanks!

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

@wushuang01 ok, I will make a try now. Thanks!^^

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

@wushuang01 How to change the dataloader for VOCdataset? I don't find it in the dataset.py.

from pytorch-yolov3.

wushuang01 avatar wushuang01 commented on July 27, 2024

@PiggyGenius I got a worse result of 0.32 mAP.Can I ask how many epochs you train on the VOC and have you change anything during training.I just change the loss_cls calculate as follow because it seems that the loss_cls value is too small:
loss_cls = self.bce_loss(pred_cls[cls_mask==1], tcls[cls_mask==1])

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

@wushuang01 Thanks! I solve this problem in another way by modifing the datasets.py code about the label file path and use the voc_label.py from darknet project to convert VOC data to a suitable format.

from pytorch-yolov3.

wushuang01 avatar wushuang01 commented on July 27, 2024

I used the pretrained darknet-53 weights and got 0.70 mAP on Voc2007.

from pytorch-yolov3.

feifeiwei avatar feifeiwei commented on July 27, 2024

img_20180717_111624

from pytorch-yolov3.

feifeiwei avatar feifeiwei commented on July 27, 2024

@wushuang01

This is the loss of my VOC2007 training process, batchsize 32. Why can't I detect anything after training?

from pytorch-yolov3.

zhangjunyi1225054736 avatar zhangjunyi1225054736 commented on July 27, 2024

I have the same problem as @wushuang01 ,after trained get a model,but it seems can not work,can not detect anything

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

I have the same problem, too. The train model doesn' t detect anything.

from pytorch-yolov3.

zhangjunyi1225054736 avatar zhangjunyi1225054736 commented on July 27, 2024

@RebornL you can try to change the code in train.py . use line "model.load_weights(opt.weights_path)" to replace line "model.apply(weights_init_normal)",it may work.

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

@zhangjunyi1225054736 ok,I make a try now. use line "model.load_weights(opt.weights_path)" to replace line "model.apply(weights_init_normal)", and I combind the @wushuang01 saving model way to use torch.save() method to save model. If work, I will tell yourselves.^^

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

@zhangjunyi1225054736 When I use load_weight method to load datrknet, it show an error below:
Traceback (most recent call last): File "/home/gmy/lqb/PyTorch-YOLOv3/train.py", line 59, in <module> model.load_weights(opt.weights_path) File "/home/gmy/lqb/PyTorch-YOLOv3/models.py", line 242, in load_weights bn_b = torch.from_numpy(weights[ptr:ptr + num_b]).view_as(bn_layer.bias) File "/home/gmy/anaconda3/lib/python3.6/site-packages/torch/tensor.py", line 230, in view_as return self.view(tensor.size()) RuntimeError: invalid argument 2: size '[512]' is invalid for input with 0 elements at /opt/conda/conda-bld/pytorch_1524586445097/work/aten/src/TH/THStorage.c:41

from pytorch-yolov3.

zhangjunyi1225054736 avatar zhangjunyi1225054736 commented on July 27, 2024

@reborn Lwhere was your model from ,download ?

from pytorch-yolov3.

RebornL avatar RebornL commented on July 27, 2024

@zhangjunyi1225054736 I fail to load “darknet53.conv.74” pretrain model, but I load "yolov3.weights" is ok. Any differences between darknet53 and yolov3.weight?

from pytorch-yolov3.

zhangjunyi1225054736 avatar zhangjunyi1225054736 commented on July 27, 2024

@RebornL I also use yolov3.weights,haven't try pretrain model by now ,t will tell you result if i did

from pytorch-yolov3.

feifeiwei avatar feifeiwei commented on July 27, 2024

I just do as you say, but why do I detect most of the object categories that are person? @wushuang01

from pytorch-yolov3.

jinyu121 avatar jinyu121 commented on July 27, 2024

@RebornL A VOCDataset: https://github.com/jinyu121/PyTorchYOLOv2/blob/master/datasets.py

from pytorch-yolov3.

LalitPradhan avatar LalitPradhan commented on July 27, 2024

@RebornL , The darknet53.conv.74 has weights upto conv73. #73 . I'm thinking we need to initialize the weights randomly first. Then load the pretrained weights upto conv73 using the pretrained darknet53.conv.74 weights. Then train the remaining layers freezing the initial layer or keeping the lr for initial layers low. @eriklindernoren , Would it be a correct way to train object detection for a small dataset?

from pytorch-yolov3.

eriklindernoren avatar eriklindernoren commented on July 27, 2024

Like @wushuang01 mentioned there is probably something wrong with Darknet.save_weights. Saving and loading state dicts seem to work well though, and I can now get the model to converge during training and get good results on test images.

from pytorch-yolov3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.