xuannianz / keras-gaussianyolov3 Goto Github PK
View Code? Open in Web Editor NEWGaussian YOLOv3 (An Accurate and Fast Object Detector Using Localization Uncertainty for Autonomous Driving (ICCV, 2019)) implementation in Keras and Tensorflow
Gaussian YOLOv3 (An Accurate and Fast Object Detector Using Localization Uncertainty for Autonomous Driving (ICCV, 2019)) implementation in Keras and Tensorflow
@xuannianz hi, thank you for this good project!
I have noticed that in your implementation, the gaussian loss is
pi = tf.constant(np.pi)
Z = (2 * pi * (sigma + sigma_const) ** 2) ** 0.5
probability_density = tf.exp(-0.5 * (x - mu) ** 2 / ((sigma + sigma_const) ** 2)) / Z
nll = -tf.log(probability_density + 1e-7)
and want to know how the mu and sigma will change during the training.
by my inference, maybe the mu should approach to the true value of x,y,w,h, and the sigmas should be reduced to 0. Is this right?
HI, could you please complete the KITTI evaluation code, or add explanation of how to conduct model on KITTI test dataset, just like the original paper?
i want to see the mAP curves on training process. thx
When I implement with pytorch, the validation stage costs much more time than origin YOLOv3...it seems like NMS occupies a lot of time. I wonder if your validation stage is also long?
您好,我在下载权重的过程中发现,百度网盘的链接需要提取码,请问可以提供一下么?谢谢您
How many interations do we need to get mAP50 0.8535 accuracy in VOC ?
Hi, I want to know where does the introduction of gaussian parameters for uncertainty calculation?
Thanks.
@xuannianz Hello, i am trying to implement guassian yolov3 in pytorch,
and i am using your guassian loss function.
During training, the guassian loss of x,y,w,h can reduce as normal, but in the test, all the test mAPs are 0. So i checked the training process, and have found that the mean of x,y,w,h didn't approach to the true value of GT while the sigmas can be rightly reduced to zero.
Can you give some advice? thanks a lot :)
HI, I download your code and just run it. But in several hundreds steps, the train loss is nan. I never any setting, what's the problems? I use the VOC dataset. Please help me!
Thanks!
i want to know if why the yolov3.cfg not change into gaussian_yolo.cfg? if the network dont need change?
thank you
你好,我现在想将普通YOLOv3转换为GaussianYOLOv3,现在已经参照xuannianz的keras-GaussianYOLOv3修改了模型的yolo_body、yolo_loss函数,增加了null_loss函数,以及修改convert文件中函数。但是执行convert将Gaussian_yolov3_BDD.weights转换为h5时会出现如下报错:
buffer=weights_file.read(weights_size * 4))
TypeError: buffer is too small for requested array
这是怎么导致的,还需要更改什么函数或者配置文件吗,请帮我解答,谢谢
# in loss.py
y_true_delta_xy = raw_y_true[..., :2] * grid_shapes[l][::-1] - grid
# ----------------------------------------------------------------------
# in util_graph.py : def y_pred_graph:
...
y_pred_delta_xy = K.sigmoid(raw_y_pred[..., :2])
y_pred_log_wh = raw_y_pred[..., 2:4]
y_pred_sigma = K.sigmoid(raw_y_pred[..., 4:8])
raw_y_true is in (0, 1) and grid is in (0, raw_y_pred_shape_wh), so y_true_delta_xy is not in (0, 1).
but y_pred_delta_xy was sigmoided, it must be in (0, 1).
that confuse me very much...
help, pls
Regress the mean and variance of X, y, W, h, and finally how to regress the value of X, y, W, H???
Hi, my project needs a fast detector but I'm not good at C, so I want to use repo in python. Is this repo as fast as claimed on the paper?
Using pytorch_GaussianYOLOv3, I save the resized image which is 416x416 and test on them, getting 21 fps, which is a little bit low.
Many thanks!
Parsing section convolutional_57
conv2d bn leaky (1024, 512, 3, 3)
Parsing section convolutional_58
conv2d linear (54, 1024, 1, 1)
Parsing section Gaussian_yolo_0
Traceback (most recent call last):
File "convert.py", line 250, in
main(parser.parse_args())
File "convert.py", line 208, in main
raise ValueError('Unsupported section header type: {}'.format(section))
ValueError: Unsupported section header type: Gaussian_yolo_0
Can you explain to me how to implement loss function Gaussian yolov3 in your code? I want to reimplement it on pytorch
hi, if i want to train my own data, how to do. I don;'t know how to make may data, and the entry of data to train. Please help me.
Thanks.
hi, @xuannianz I try to train the VOC data, and get this error
File "/home/bigdata/chenfangxiong/keras-GaussianYOLOv3/train.py", line 341, in
main()
File "/home/bigdata/chenfangxiong/keras-GaussianYOLOv3/train.py", line 295, in main
model, prediction_model = yolo_body(anchors, num_classes=num_classes)
File "/home/bigdata/chenfangxiong/keras-GaussianYOLOv3/model.py", line 130, in yolo_body
[y1, y2, y3, fm_13_input, fm_26_input, fm_52_input])
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/keras/engine/base_layer.py", line 451, in call
output = self.call(inputs, **kwargs)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/keras/layers/core.py", line 716, in call
return self.function(inputs, **arguments)
File "/home/bigdata/chenfangxiong/keras-GaussianYOLOv3/loss.py", line 46, in yolo_loss
raw_y_pred = K.reshape(yolo_output, [-1, grid_shape[0], grid_shape[1], num_anchors_per_layer, num_classes + 9])
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 2189, in reshape
return tf.reshape(x, shape)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 6197, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 513, in _apply_op_helper
raise err
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 510, in _apply_op_helper
preferred_dtype=default_dtype)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1107, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 217, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 196, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 436, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/home/bigdata/.conda/envs/fcon/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 344, in _AssertCompatible
raise TypeError("List of Tensors when single Tensor expected")
TypeError: List of Tensors when single Tensor expected
I trained with my own dataset and made the above mistakes
how to run on CPU?
What configuration should I change?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.