Zehaos / MobileNet

MobileNet build with Tensorflow
Apache License 2.0
1.62k stars 470 forks source link

目标检测的实现 #19

Closed ydzhang12345 closed 7 years ago

ydzhang12345 commented 7 years ago

你好,我们刚刚尝试了用你们的model fine tune在了自己的dataset上(traffic sign classification),感觉效果不错。我看到关于目标检测这部分还在debugging之中, 想问下现在主要哪部分还未完善呢?由于时间紧迫,我们需要尽快完成这部分的功能,所以想看看可不可以自己把剩下的部分补充好

Zehaos commented 7 years ago

Hi,

目标检测部分已经可以训练,并且是收敛的。

剩下的部分:

  1. Evaluation code
  2. Optimization
  3. 存在的问题:
    • 当两个gt_bbox匹配到同一个anchor上的时候, 我是直接descard了其中一个gt_bbox。 需要评估下这样会不会导致很大的精度下降。
    • 我本来想追求代码的灵活性, 将label的处理放在graph中,但是现在觉得这样不是很明智,如果将label的处理放在tfrecord中,graph可以很简单(就像squeezedet一样)。
    • lr不能太大, 因为一开始的loss不太稳定,容易Nan。这个问题有可能是第一个问题导致的。

有什么问题可以在这个issue中交流, 谢谢~

zsz02 commented 7 years ago

我 也是在 训练目标检测, 在VOC_2007上, 总是不能收敛,很困惑 。。。。。

Zehaos commented 7 years ago

@zsz02 目前只测试了kitti, 可以把mobilenet搬到squeezeDet中train。

kaishijeng commented 7 years ago

I run detection training with Kitti, but loss does not converge ( always stay around 24.00 after 64000 iterations). Do you see the same behavior?

Thanks,

Zehaos commented 7 years ago

Try to tune the learning rate and lr policy. Loss would converge to about 1.5.

kaishijeng commented 7 years ago

Can you recommend values of learning rate and lr policy to try?

FC

Zehaos commented 7 years ago

You can try: --optimizer=sgd --learning_rate=0.00005 --learning_rate_decay_factor=0.5 --num_epochs_per_decay=10.0

davidduo commented 7 years ago

@Zehaos 请问你在检测任务finetune时候,有没有fixed的参数?或者放开了哪些层,固定了哪些层?

Zehaos commented 7 years ago

@davidduo 还没尝试固定参数。 一般需要固定前面几层。

Goliathplus commented 7 years ago

請問可以用 VOC2007 這類有 multi label 的 data base 來做 classification training 嗎?

Zehaos commented 7 years ago

应该是可以的,无非就是把onehot的标签变为'nhot'。VOC有几个类别尺寸比较大,应该可以用。尺寸太小的就不好说。

Zehaos commented 7 years ago

@Goliathplus https://arxiv.org/abs/1702.05891 这篇文章看起来不错

kaishijeng commented 7 years ago

Google releases its mobilenet code and pretrained models today (See below). There is a family of mobilenet in this release. Which configuration is your mobilenet?

https://research.googleblog.com/2017/06/mobilenets-open-source-models-for.html

Thanks,

Zehaos commented 7 years ago

@kaishijeng The first one. But still, the others also could be implemented using my code.

kaishijeng commented 7 years ago

Thanks for the info. Do you have a pretrained detection model which you can share? I am still not able to get loss down to below 8 with my own training using values you suggested: --optimizer=sgd --learning_rate=0.00005 --learning_rate_decay_factor=0.5 --num_epochs_per_decay=10.0

Thanks,

Zehaos commented 7 years ago

@kaishijeng Sorry, no pre-trained detection model is avaliabled now. it is still under developing. And, the most important, I do not guarantee that the detection part has no bug.

Zehaos commented 7 years ago

Guys, The official implementation of object detection is now released, see tensorflow/model/object_detection.

Zehao

mydear33000 commented 7 years ago

@Zehaos Detection training with Kitti, loss still can not converge! Same problem as @kaishijeng!

kaishijeng commented 7 years ago

@Zehaos

Any idea when you will have a trained detection model to share?

Thanks,