Hi
I install darknet window version.
(I checked operation using yolo.cfg, yolo.weights, coco.data.)
I used darknet ubuntu version to train my own data.
I checked operation my weights in ubuntu
But, it does't work at windows version
Please how to solve this problem?
Please describe more or add some screenshots of what problem do you have in details
@kyunghwan
yolo-voc.cfg or on yolo-voc.2.0.cfg?Thank you everyone.
@AlexeyAB
I used cfgfile based on yolo-voc.2.0.cfg. (Does it affect the results differently?)
and I used pjreddie/darknet newest version.
I will try using this fork version.
@AlexeyAB
What is the actual difference between yolo-voc.cfg and yolo-voc.2.0.cfg?
V2.0 tends to be better and we should train and test using it?
@kyunghwan @VanitarNordic
This fork allows detection using any cfg files. But only yolo-voc.2.0.cfg can be used for training.
yolo-voc.cfg a little bit smaller and a little bit faster.
One of diff is addition convolutional layer with size=1, that convolve 26x26x512 to 26x26x64, i.e. it decreases size of tensor before reorg-layer: https://github.com/AlexeyAB/darknet/blob/e4323274f2ab75a6813e259f852ee3d8cf335fa5/cfg/yolo-voc.cfg#L211
This affects the detection of small objects, but I have not tested whether it improves or worsens detection.
I had tested the yolo-voc.cfg before. regarding small object I can say if they are included in the training set in various scales, then it will detect them.
But in the next few days I will train and test again with this new yolo-voc.2.0.cfg and tell you the results or any differences. if they have added some layers then theoretically it should improve the accuracy, but minor changes in speed because the modification is not massive and it seems like a model tuning.
This fork supports on detection task any cfg. But this fork supports for training only ...
I think you made a typo mistake. You mean this final fork just should be trained with yolo-voc.2.0.cfg, but can be tested with this cfg and also others?
@VanitarNordic Yes.
@kyunghwan
"But, it doesn't work at windows version"
Do you mean it doesn't detect objects at all or detections are incorrect?
If it doesn't detect objects at all, you can try to modify file parser.c in this windows fork. I've met the same problem too (I'm not sure that it's exactly the same) but these modifications helped me:
replace this line of code:
fread(net->seen, sizeof(int), 1, fp);
with the next block :
if ((major*10 + minor) >= 2){
fread(net->seen, sizeof(size_t), 1, fp);
} else {
int iseen = 0;
fread(&iseen, sizeof(int), 1, fp);
*net->seen = iseen;
}
@AlexeyAB
I did training with the latest fork and yolo-voc.2.0.cfg. The used dataset was exactly identical with the older forks:
yolo-voc.2.0.cfg : IoU=69% Recall=86%yolo-voc.cfg : IoU=69% Recall=86%IoU=75% Recal=94%Therefore the accuracy has diminished significantly
@VanitarNordic Thank you! What do you mean about older and latest fork, which repo & commit?
@AlexeyAB
I don't remember the repo but I mean the last commit where we solved the random function issue with rand_s. I had kept a copy of that repo in my hard disk.
I'm continuously testing the last repo. it might be a minor issue somewhere in the code. if this new .cfg has introduced by the authors, then the problem "might be" from somewhere else such as the code.
@AlexeyAB
I trained the last repo with old yolo-voc.cfg and also made a validation with it: IoU=70.7% Recall=86.5%
@AlexeyAB
I tried again and I can not get higher values with the latest repo. Could be something related to the OpenCV versions? because in the past it was fixed to 2.4.9.
if not, please have a look at what has changed from past. if you inform me, then I can have a look because I have focus on this right now.
@VanitarNordic Are you about my repo? https://github.com/AlexeyAB/darknet
5 Apr I changed threshold in validate_detector_recall() from 0.001; to 0.2;: https://github.com/AlexeyAB/darknet/blame/master/src/detector.c#L397
Because the value of 0.2 is closer to the real threshold, which is used for detection (default 0.24).
So now you get more real IoU than earlier.
@AlexeyAB
Yes, I am talking about your repo. changing that value changes RPs/Img. I don't think that threshold is the same as detection threshold because 0.001 is very low (it is 0.1%) and if we use it in detection then the screen will be full of bounding boxes.
@VanitarNordic Recall threshold is the same as detection threshold.
Yolo calculates only the best of IoU instead of average IoU, so if we set threshold 0.001, then yolo will remove any bad bounding boxes exclude one the best: https://github.com/AlexeyAB/darknet/blob/489207111f1cdf0d7e3bcfc2410a92121c58f3cd/src/detector.c#L435
@AlexeyAB
I'm not quite sure because that might be the IoU value when the model trains itself, I mean the Avg IoU in console during training,
if your comment is right, then actually we are not fine-tuning the model, because results are much worse than the initial thoughts when we fine-tune a model. I mean it must be much better. I think the provided weights is a initial weights used for training.
@kyunghwan I added some fixes. Just try to update your code from this repository and try to use your model.
@AlexeyAB
I'll do that and tell you the results. But I don't think the authors intentionally used a low number to produce non-realistic results and publish a paper.
@VanitarNordic Authors didn't publish IoU results anywhere. This is a purely internal indicator for own needs.
@AlexeyAB
You don't change your mind no problem :-) but I got worse detection using that (older repo detecting better). I'll try your new code to see what will happen.
@VanitarNordic Just set float thresh = .001; and try: https://github.com/AlexeyAB/darknet/blob/489207111f1cdf0d7e3bcfc2410a92121c58f3cd/src/detector.c#L397