"...lm-evaluation-harness.git" did not exist on "2e8aa9c2fc80de82794b392eb4133192bda9ce1e"
Commit 79a9d52f authored by chenych's avatar chenych
Browse files

Modify README and add gen_data.py

parent 6a00812f
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"info": {
"version": "1.0",
"year": 2020,
"contributor": "Mr.yang",
"date_created": "2018/08/21",
"github": "https://github.com/bleakie"
},
"licenses": [
{
"url": "http://creativecommons.org/licenses/by-nc-sa/2.0/",
"name": "Attribution-NonCommercial-ShareAlike License",
"id": 1
}
],
"images": [],
"annotations": [],
"categories": [
{
"supercategory": "face",
"id": 1,
"name": "face",
"keypoints": [
"left_eye",
"right_eye",
"nose",
"left_mouth",
"right_mouth"
]
}
]
}
\ No newline at end of file
# 模型唯一标识
modelCode = 440
# 模型名称
modelName=centerface_pytorch
# 模型描述
modelDescription=CenterFace是一种人脸检测算法,采用了轻量级网络mobileNetV2作为主干网络,结合特征金字塔网络(FPN)实现anchor free的人脸检测。
# 应用场景
appScenario=推理,训练,教育,交通,公安,医疗
# 框架类型
frameType=PyTorch
...@@ -31,17 +31,16 @@ class FACEHP(data.Dataset): ...@@ -31,17 +31,16 @@ class FACEHP(data.Dataset):
self.acc_idxs = [1, 2, 3, 4] self.acc_idxs = [1, 2, 3, 4]
self.data_dir = opt.data_dir self.data_dir = opt.data_dir
self.img_dir = os.path.join( self.img_dir = os.path.join(self.data_dir, 'images/train') # 训练图片所在地址
self.data_dir, 'WIDER_train/images') # 训练图片所在地址
_ann_name = {'train': 'train', 'val': 'val'} _ann_name = {'train': 'train', 'val': 'val'}
if split == 'val': if split == 'val':
self.annot_path = os.path.join( self.annot_path = os.path.join(
self.data_dir, 'annotations', self.data_dir, 'labels',
'{}_wider_face.json').format(_ann_name[split]) '{}_face.json').format(_ann_name[split])
else: else:
self.annot_path = os.path.join( self.annot_path = os.path.join(
self.data_dir, 'annotations', self.data_dir, 'labels',
'{}_wider_face.json').format(_ann_name[split]) '{}_face.json').format(_ann_name[split])
self.max_objs = 32 self.max_objs = 32
self._data_rng = np.random.RandomState(123) self._data_rng = np.random.RandomState(123)
self._eig_val = np.array([0.2141788, 0.01817699, 0.00341571], self._eig_val = np.array([0.2141788, 0.01817699, 0.00341571],
......
...@@ -92,7 +92,7 @@ class opts(object): ...@@ -92,7 +92,7 @@ class opts(object):
# train # train
self.parser.add_argument('--lr', type=float, default=1.25e-4, self.parser.add_argument('--lr', type=float, default=1.25e-4,
help='learning rate for batch size 32.') help='learning rate for batch size 32.')
self.parser.add_argument('--lr_step', type=str, default='30,80', self.parser.add_argument('--lr_step', type=str, default='90,120',
help='drop learning rate by 10.') help='drop learning rate by 10.')
self.parser.add_argument('--num_epochs', type=int, default=140, self.parser.add_argument('--num_epochs', type=int, default=140,
help='total training epochs.') help='total training epochs.')
......
...@@ -114,8 +114,8 @@ if __name__ == '__main__': ...@@ -114,8 +114,8 @@ if __name__ == '__main__':
debug = 0 debug = 0
model_path = '../models/model_best.pth' # or your model path model_path = '../models/model_best.pth' # or your model path
# 单图测试 # 单图测试
# test_img(model_path, debug) test_img(model_path, debug)
# 视频测试 # 视频测试
# test_vedio(model_path, debug) # test_vedio(model_path, debug)
# WIDER_val 数据集测试 # WIDER_val 数据集测试
test_wider_Face(model_path, debug) # test_wider_Face(model_path, debug)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment