关于后端:CenterNet-3D-Object-Detection

5次阅读

共计 1538 个字符,预计需要花费 4 分钟才能阅读完成。

Paper and Code

  • Paper:https://arxiv.org/pdf/1904.07…
  • Code:https://github.com/xingyizhou…

CenterNet 原理

参考之前写的一篇文章,https://zhuanlan.zhihu.com/p/…

3D detection

3D 检测其实就是来预测每张图三个维度的 bounding box。这里每个中心点须要增加三个附加信息别离是 depth, 3D dimension, 以及 orientation。因为 depth 很难回归,一咱们应用这个公式去计算 depth,即 $d=1/\delta{(\hat{d})-1}$,这里 $\delta$ 示意的是 $sigmoid$ 函数。设置 depth 作为关键点评估器的另一中输入通道 $\hat{D}\in[0,1]^{\frac{w}{r}\times\frac{H}{R}}$ 这里别离两个卷积层,并且卷积层之间应用 $ReLU$ 函数一次。咱们间接应用一个独立的 head.$\Gamma\in[0,1]^{\frac{W}{R}\times\frac{H}{R}\times3}$ 方向默认是单标量的值。然而,它可能很难回归到。通过将方向示意为两个 $ bins $,采纳 $in-bin $ 回归。具体来说,方向应用 8 个标量编码,每个 $bin$ 有 4 个标量。对于一个 $ bin$,,两个标量用于 $softmax$,其余两个标量回归到每个 bin 内的一个角度。

Demo test

4.1 Clone this repo
git clone https://github.com/xingyizhou/CenterNet.git
cd CenterNet
4.2 Install COCOAPI
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
python setup.py install --user
4.3 Install the requirements
pip install -r requirements.txt
4.4 Compile deformable convolutional (from DCNv2)
cd CenterNet/src/lib/models/networks/
git clone https://github.com/CharlesShang/DCNv2
cd DCNv2
./make.sh         # build
python testcpu.py    # run examples and gradient check on cpu
python testcuda.py   # run examples and gradient check on gpu 
4.5 Compile NMS if your want to use multi-scale testing or test ExtremeNet
cd CenterNet/src/lib/external
make
4.6 Download Model ZOO

https://github.com/xingyizhou…

4.7 test

ddd 示意 3D 检测,ctdet 示意 2D 指标检测,再配置网络结构:dla_34,测试数据门路(能够是一个视频文件或一个图片文件夹),预训练模型门路:ddd_3dop.pth

4.8 demo

最终失去 3D 检测后果,别离为鸟瞰图和 3D 检测失去的图

4.9 train

python main.py ddd --exp_id 3dop --dataset kitti --kitti_split 3dop --batch_size 16 --master_batch 7 --num_epochs 70 --lr_step 45,60 --gpus 0,1

本文由 mdnice 多平台公布

正文完
 0