这是一个 CenterFace 的极简实现。
Python >= 3.6
pytorch >= 1.0
torchvision
pillow == 6.2.0
tqdmexport CUDA_VISIBLE_DEVICES=0
python train.pypython api.py由于这边的格式是retinaface的
# 图片名
left top width height lm1_x lm2_y ....
left top width height lm1_x lm2_y .... 所以,如果你想训练一个普通的检测网络,你可以把你的标签组织成
# 图片名
left top width height
left top width height然后,把datasets.py中涉及 landmarks 的函数调用,标签生成都去掉就可以了。具体来说,可以从以下两个函数调用入手。
im, bboxes, landmarks = self.preprocess(im, anns)
hm = self.make_heatmaps(im, bboxes, landmarks, self.downscale)愿凡有所得,皆能自利利他。