GithubHelp home page GithubHelp logo

jwchoi384 / gaussian_yolov3 Goto Github PK

View Code? Open in Web Editor NEW
661.0 661.0 180.0 6.72 MB

Gaussian YOLOv3: An Accurate and Fast Object Detector Using Localization Uncertainty for Autonomous Driving (ICCV, 2019)

Home Page: http://openaccess.thecvf.com/content_ICCV_2019/html/Choi_Gaussian_YOLOv3_An_Accurate_and_Fast_Object_Detector_Using_Localization_ICCV_2019_paper.html

License: Other

Makefile 0.32% Python 2.09% C 89.20% Shell 0.20% Cuda 7.53% C++ 0.65% HTML 0.01%
computer-vision deep-learning dnn gaussian-yolov3 gaussian-yolov3-implementation gaussianyolov3 neural-network object-detection

gaussian_yolov3's People

Contributors

jwchoi384 avatar motokimura avatar xuannianz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gaussian_yolov3's Issues

sigma_const hyper parameter

Hi, I talked with you at your poster in ICCV2019!
I just released PyTorch implementation of Gaussian YOLOv3 with training code on COCO dataset. Would it be possible to include link to our repo in third-party-implementations section of your README? If it is okay for you, I can send a pull request to update your README.

Though Gaussian YOLOv3 in our repo shows significant improvement of COCO mAP (2.7 point) on COCO2017 val, this improvement is still smaller than the one reported in your paper (3.1 point).
I'm wondering if this difference comes from the hyper parameter sigma_const set to 0.3 in your implementation (our implementation does not have this parameter).

Do you think sigma_const affects the result a lot?
How did you find the value 0.3 for this parameter?

Questions about confidence score threshold

Hi, @jwchoi384. Thanks for this wonderful project.
Since I did not find any confidence score threshold in the bdd evaluation script, I wonder if you set confidence score threshold when evaluate.

If the answer is yes, how do you set the thresholds when you evaluate YOLOv3 and Gaussian_YOLOv3? After multiply the box certainty score, the final confidence score in Gaussian_YOLOv3 would be a little smaller than the one in YOLOv3.

Ask about IDE

Hi Choi,
which IDE for the paper?
Best regards,
Peter Pham

model weight

Hi, could you please upload model weight to repository? Sorry, I cannot download it from the google.drive.
Thanks!

a question about equation (5)

In the equation (5), Loss function is defined as -log(N(x|μ,σ). I think N(x|μ,σ)is the value of probability density function of gaussian distribution. What does that mean? Does it reflect the probability?

Why we need w_scale?

In the paper, "w_scale in equation (8) is calculated based on the width and height
ratios of the GT bbox in an image, as shown in (9). It provides different weights according to the object size during training."
I don't understand why loss should be weighted according to the size of the objects? Thanks.

class ordering

Hi, a strange idea happens to me: the test result on server doesn't give the class name corresponding to mAP value, so how can I know which value belongs to its class? And further, when I make txt training file, could the ordering of class name be consistent with that of official test?
Thanks in advance!

BDD test server

Hi, jwchoi284. I tried to upload test result of single class to the server fro evaluation as you said before, but still no any result could be returned. I am really helpless, and do you have some ideas for me?
Thanks in advance!

Model validation

Thanks for the work! I trained the Gaussian Yolov3 on my own dataset. When I tried to validate the model by using: ./darknet detector valid cfg/xx.data cfg/xx.cfg backup/xxx.weights I found all the results are saved in the /results directory with separate txt files corresponding to different categories, which may be related to "eval = xx" in cfg file. May I know what are the choices for eval? And which one is suggested for the evaluation of darknet format labels?

Support yolov2?

hi ,i try to train yolov2 by your code(Gaussian), but report error“Floating point exception (core dumped)”

train loss

Hi, I run the code trained on BDD100K dataset from scratch, but the result returns loss nan. What's the problems? Could you please give me some advice for mode training in such case?
Thanks!

count FP/TP

Hi @jwchoi384 ,
I want to calculate TP/FP of KITTI dataset in your paper. How can I do it ?

loss is nan

Hi, nice work!

I use it to train yolov3-tiny.After training 150 batch, the loss became nan,Have you encountered this problem? Thank you!

batch=32,subdivisions=16,learning_rate=0.0001

Region 15 Avg IOU: nan, Class: 0.441899, Obj: 0.010084, No Obj: 0.009767, .5R: 0.478261, .75R: 0.043478, count: 23
Region 22 Avg IOU: 0.392249, Class: 0.575245, Obj: 0.002243, No Obj: 0.001650, .5R: 0.236842, .75R: 0.000000, count: 38
Region 15 Avg IOU: nan, Class: 0.458486, Obj: 0.010441, No Obj: 0.009767, .5R: 0.428571, .75R: 0.000000, count: 7
Region 22 Avg IOU: 0.464182, Class: 0.519555, Obj: 0.001945, No Obj: 0.001650, .5R: 0.460317, .75R: 0.015873, count: 63
Region 15 Avg IOU: nan, Class: 0.461843, Obj: 0.010374, No Obj: 0.009767, .5R: 0.320000, .75R: 0.040000, count: 25
Region 22 Avg IOU: 0.386944, Class: 0.502782, Obj: 0.001714, No Obj: 0.001650, .5R: 0.274510, .75R: 0.019608, count: 51
Region 15 Avg IOU: nan, Class: 0.463781, Obj: 0.010159, No Obj: 0.009767, .5R: 0.285714, .75R: 0.071429, count: 28
Region 22 Avg IOU: 0.439150, Class: 0.492993, Obj: 0.001829, No Obj: 0.001650, .5R: 0.428571, .75R: 0.000000, count: 49
Region 15 Avg IOU: nan, Class: 0.466690, Obj: 0.010356, No Obj: 0.009767, .5R: 0.150000, .75R: 0.050000, count: 20
Region 22 Avg IOU: 0.346722, Class: 0.426868, Obj: 0.001468, No Obj: 0.001650, .5R: 0.240000, .75R: 0.040000, count: 50
Region 15 Avg IOU: nan, Class: 0.466256, Obj: 0.010191, No Obj: 0.009767, .5R: 0.136364, .75R: 0.000000, count: 22
Region 22 Avg IOU: 0.382021, Class: 0.544101, Obj: 0.002096, No Obj: 0.001650, .5R: 0.247059, .75R: 0.000000, count: 85
Region 15 Avg IOU: nan, Class: 0.465827, Obj: 0.010348, No Obj: 0.009767, .5R: 0.222222, .75R: 0.000000, count: 18
Region 22 Avg IOU: 0.444984, Class: 0.587952, Obj: 0.001802, No Obj: 0.001650, .5R: 0.467532, .75R: 0.025974, count: 77
Region 15 Avg IOU: nan, Class: 0.466738, Obj: 0.009839, No Obj: 0.009767, .5R: 0.300000, .75R: 0.000000, count: 10
Region 22 Avg IOU: 0.371075, Class: 0.510235, Obj: 0.002036, No Obj: 0.001650, .5R: 0.300000, .75R: 0.000000, count: 30
Region 15 Avg IOU: nan, Class: 0.460950, Obj: 0.010231, No Obj: 0.009767, .5R: 0.473684, .75R: 0.105263, count: 19
Region 22 Avg IOU: 0.397543, Class: 0.496430, Obj: 0.001451, No Obj: 0.001650, .5R: 0.337662, .75R: 0.025974, count: 77
Region 15 Avg IOU: nan, Class: 0.451978, Obj: 0.010417, No Obj: 0.009767, .5R: 0.666667, .75R: 0.166667, count: 6
Region 22 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.001650, .5R: -nan, .75R: -nan, count: 0
Region 15 Avg IOU: nan, Class: 0.463936, Obj: 0.010312, No Obj: 0.009767, .5R: 0.250000, .75R: 0.000000, count: 28
Region 22 Avg IOU: 0.527799, Class: 0.639013, Obj: 0.001620, No Obj: 0.001650, .5R: 0.596774, .75R: 0.064516, count: 62
Region 15 Avg IOU: nan, Class: 0.466003, Obj: 0.010128, No Obj: 0.009767, .5R: 0.240000, .75R: 0.040000, count: 25
Region 22 Avg IOU: 0.493470, Class: 0.549164, Obj: 0.001179, No Obj: 0.001650, .5R: 0.461538, .75R: 0.128205, count: 39
Region 15 Avg IOU: nan, Class: 0.464300, Obj: 0.010413, No Obj: 0.009767, .5R: 0.102564, .75R: 0.000000, count: 39
Region 22 Avg IOU: 0.478209, Class: 0.595393, Obj: 0.001984, No Obj: 0.001650, .5R: 0.486111, .75R: 0.027778, count: 72
Region 15 Avg IOU: nan, Class: 0.457656, Obj: 0.010366, No Obj: 0.009767, .5R: 0.240000, .75R: 0.000000, count: 25
Region 22 Avg IOU: 0.451578, Class: 0.537413, Obj: 0.002011, No Obj: 0.001650, .5R: 0.385714, .75R: 0.028571, count: 70
Region 15 Avg IOU: nan, Class: 0.457986, Obj: 0.010434, No Obj: 0.009767, .5R: 0.357143, .75R: 0.000000, count: 14
Region 22 Avg IOU: 0.343575, Class: 0.520320, Obj: 0.002263, No Obj: 0.001650, .5R: 0.233333, .75R: 0.000000, count: 30
Region 15 Avg IOU: nan, Class: 0.461090, Obj: 0.010450, No Obj: 0.009767, .5R: 0.222222, .75R: 0.000000, count: 9
Region 22 Avg IOU: 0.510054, Class: 0.517130, Obj: 0.001078, No Obj: 0.001650, .5R: 0.550000, .75R: 0.000000, count: 20
151: nan, -nan avg, 0.000100 rate, 2.439035 seconds, 4832 images

Why can it reduce FP?

@jwchoi384
Thank you for your work done.
I don't quite understand why the uncertainty of regression can reduce FP.
float prob = objectness*predictions[class_index]*(1.0-uc_aver);
That only reduces the prob. Can you give me some explanation?Thank you!

txt2json

Hi, could you please provide script for us that converts txt to json format, so that we can evaluate on bdd-data? My ground-truth file is txt format due to being used for yolov3 model training.
Thanks a lot.

KITTI dataset

Can I use KITTI dataset that contains .txt and img files for car plate detection

Can you explain the loss function (5) in paper?

Hi, nice work!

I want to use tf implementation the work, but i dont know loss function (5) in paper; Especially the vertical line symbol in Especially the vertical line symbol; I read you code, but i dont know the following code:

` float temp_x = (1./2.) * 1./(normal_dist_x+epsi) * normal_dist_x * scale;
float temp_y = (1./2.) * 1./(normal_dist_y+epsi) * normal_dist_y * scale;
float temp_w = (1./2.) * 1./(normal_dist_w+epsi) * normal_dist_w * scale;
float temp_h = (1./2.) * 1./(normal_dist_h+epsi) * normal_dist_h * scale;

delta[index + 0*stride] = temp_x * in_exp_x  * (1./x[index+1*stride]);
delta[index + 2*stride] = temp_y * in_exp_y  * (1./x[index+3*stride]);
delta[index + 4*stride] = temp_w * in_exp_w  * (1./x[index+5*stride]);
delta[index + 6*stride] = temp_h * in_exp_h  * (1./x[index+7*stride]);

delta[index + 1*stride] = temp_x * (in_exp_x_2/x[index+1*stride] - 1./(x[index+1*stride]+sigma_const));
delta[index + 3*stride] = temp_y * (in_exp_y_2/x[index+3*stride] - 1./(x[index+3*stride]+sigma_const));
delta[index + 5*stride] = temp_w * (in_exp_w_2/x[index+5*stride] - 1./(x[index+5*stride]+sigma_const));
delta[index + 7*stride] = temp_h * (in_exp_h_2/x[index+7*stride] - 1./(x[index+7*stride]+sigma_const));`

Can you give a detailed explanation? Thanks for your great work.

Training result is not convergent

Hi, jwchoi

when I training Gaussian yolov3 model (lr = 0.0001 0.00001 0.000001), the avg loss value can't converge, after the loss value touched 1, then the loss start increase slowly.

have you met this problem, did I missed some details?

tiny改进

Hello, how does this algorithm apply to Yolov3 tiny

Is there a report on COCO?

Maybe, the motivation of authors at beginning is to optimize YOLOv3's behavior on autonomous driving dataset. Well, if the explanation of Gaussian and location score is true, it seems workable for general object detection. So. I'm very curious about the mAP result of COCO.

If training from ImageNet pretrained model are expensive, I hope anyone can offer a result of fineture reult on a well-trained YOLOv3 model witch implement the modification proposed in this paper.

how do you think about NLL loss?

the Lx is negative log likelihood loss. But why the it is negative and log. May you use the log may get rid of the e of normal distribution.

Training failure

Hi @jwchoi384
Thanks for you share.
I refer to your code, compiled a version, I am using your weight file and configuration file, when you reason, I can get the same result as you.
However, when I went to train myself , the network could not converge and fluctuated around 10 rounds.
Excuse me, what is the reason?
Single card, 1080ti, lr=0.001


batch=64
subdivisions=16
width=416
height=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
flip=0
learning_rate=0.001
burn_in=1000
max_batches = 50020
policy=steps
steps=40000,45000
scales=.1,.1

Thank you very much.

KITTI result on Yolov3

image
I have trained KITTI dataset around 20k iter with yolov3 to reproduce your result in paper and archive mAP like this with your setting in paper. Through training process, i saw loss value was converging but i don't know why mAP for Car at easy is quite low. Did you see it normal? Can you give me some ideas about this result?

Test on my own dataset error?

I use eval = bdd and eval = coco in *.data file.
Try test and valid command.
test return nothing
valid return .json file, but json file is empty.
so how to test on my own dataset train weights?

How much training loss can be reduced?

I have trained on my dataset,found the training loss is much higher,it was 40 but ap 98.3.Compared to the original yolov3, the loss is less than 0.3 and ap 99.3.
So what range of training loss is normal by using new loss func and which tricks you have used?

Traing KITTI result

Hi @jwchoi384 ,
After training process with 60k iteration, I got this result. I see a big gap between result from your paper and my result in Car Moderate mAP.And I want to hear your idea about the gap? Is it normal ?
image

Tiny yolov3

Can I use tiny yolov3 cfg file with Gaussian Yolov3?
And if yes what changes I have to make to train images with tiny yolov3 cfg file?

How to KITTI evaluation code

Hi, could you please teach me to use KITTI evaluation code? Now, I have trained my model and obtained predicted results on test data based on trained model. And then the evaluation code have been downloaded from the official website. But I cannot use it, and how can I do next? Please help me to continue!
Thanks in advance!

python/darknet.py

I want to ask about Python / darknet.py res.append([meta.names[i], dets[j].prob[i], [b.x, b.y, b.w, b.h]])
When output, when J > 1, error is always reported? It seems that there is no such value

Error with compiling a code

Hello, i'm want to test this model on my data. After i cloned a files i tried to make it. And i have this error msg:

Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
In file included from ./src/utils.h:5:0,
from ./src/gemm.c:2:
include/darknet.h:14:14: fatal error: curand.h: No such file or directory
#include "curand.h"
^~~~~~~~~~
compilation terminated.
Makefile:89: recipe for target 'obj/gemm.o' failed
make: *** [obj/gemm.o] Error 1

But darknet YOLOv3 compiles without this errors. Should paths of this project and darknet have some special structure?

bdd100k server

Hi, I delivered the predicted result on test data to the BDD100K server, but I don't receive any response yet. And I sent the email to the official, there was also no any information returned to me. Do you know what's the problem? Is Does the server exist some bugs? How do you receive your test result?
Please help me! Thanks!

How to prepare bdd dataset for training?

Hi jwchoi384,
Thanks for the awsome project. I wonder how to prepare the dataset for training. Except I need to generate test_bdd_list.txt, train_bdd_list.txt and val_bdd_list.txt, do I need to generate a label txt file for each image? And should the label txt file be in the same folder with responding image?

Finally, is there a script to reference?

Confused about the NLL loss you proposed

@jwchoi384

Hi, I'm confused about the loss function you proposed at equation (5) in your paper.

In my understanding, the goal of the NLL loss is trying to make the predicted mean value and GT value as close as possible, e.g 1 and 2

and make the variance, e.g. 3 close to 0 (which means high certainty).

However, at your equation, if the predicted mean value equals GT value and variance close to 0, the
NLL loss could be negative.

How do you think about this?

Thanks!

why I use camera ,the process time is too long

halo,thank you to open your code!
when I was get this code, I used the USB camera, and run below command:
./darknet detector demo cfg/BDD.data cfg/Gaussian_yolov3_BDD.cfg Gaussian_yolov3_BDD.weights
even the teminal display the FPS is 51
but in fact,the windows of image out show is too slow, process time is too long compared with the original YOLOV3,
so I want to know how to get better that use USB camera

and my computer's GPU is TITAN xp, i use cuda10.1
thank you!!

KITIT dataset

Can you provide model/cfg file/evaluate code for KITIT dataset used in your paper ?

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.