Comments (27)
@RebornL I change the dataloader for VOCdataset and then change the yolov3.cfg for 20 classes in VOC.
from pytorch-yolov3.
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.
@RebornL I take some reference from the pull requests.
from pytorch-yolov3.
@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.
can you share the code?thanks.
from pytorch-yolov3.
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.
hello,I want to ask how to train on VOC2007 dataset
from pytorch-yolov3.
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.
@wushuang01 ok, I will make a try now. Thanks!^^
from pytorch-yolov3.
@wushuang01 How to change the dataloader for VOCdataset? I don't find it in the dataset.py.
from pytorch-yolov3.
@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.
@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.
I used the pretrained darknet-53 weights and got 0.70 mAP on Voc2007.
from pytorch-yolov3.
from pytorch-yolov3.
This is the loss of my VOC2007 training process, batchsize 32. Why can't I detect anything after training?
from pytorch-yolov3.
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.
I have the same problem, too. The train model doesn' t detect anything.
from pytorch-yolov3.
@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.
@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.
@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.
@reborn Lwhere was your model from ,download ?
from pytorch-yolov3.
@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.
@RebornL I also use yolov3.weights,haven't try pretrain model by now ,t will tell you result if i did
from pytorch-yolov3.
I just do as you say, but why do I detect most of the object categories that are person? @wushuang01
from pytorch-yolov3.
@RebornL A VOCDataset: https://github.com/jinyu121/PyTorchYOLOv2/blob/master/datasets.py
from pytorch-yolov3.
@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.
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)
- Replace own `Mish` implementation by torch's HOT 5
- Crash after processing JSON to RDF HOT 2
- Need help with getting bboxes.
- very low mAP on coco val2014 when training from scratch HOT 18
- how to set custom path for labels? please help me HOT 6
- how to adjust learning rates or something to be better when using a pretrained model to train my dataset?please give me some advice HOT 5
- i'm using yolov3.weights to test data/sample/, i found there are some wrong bboxes which are different from this projects HOT 8
- Unable to fully load data classes of classes.names HOT 1
- Questions regarding the evaluation model in train.py and test.py HOT 1
- PyTorch-YOLOv3 Tracking
- is woring in 3090,lower fps! HOT 2
- for Linux?or for windows? HOT 6
- mAP nearly zero? HOT 3
- Testing Suite
- 关于pytorchyolo1.8.0和GPU不兼容的问题 HOT 1
- 怎么把pytorchyolo卸载干净呀? HOT 2
- how can i calculate the params and flops of yolov3-tiny model 如何计算 yolov3-tiny 模型的参数和计算量?
- Would support torchv2.2.2?
- tensorboard没有显示的结果? HOT 1
- How to compute FPS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-yolov3.