How to create .lst file for this project
See original GitHub issueHi @nttstar @yingfeng @yuzhichang @zhangxu19830126 @kernel8liang I want to use my own dataset for finetuning the pre-trained age-gender model(gamodel-r50). And I am creating a directory ‘all_ages’ in the same directory in which face2rec.py(src/data/) is. Then I have 100 sub-directories in this directory data corresponding to 0-99 ages, which further contains images in it accordingly. But face2rec.py function doesn’t contain code or make_list function (even if I pass --list True to parser). The other option I am left with is to use im2rec.py from mxnet
But the format of .lst file that im2rec.py generates doesn’t matches with the format that parse_lst_line (face_preprocess.py) function processes.
def parse_lst_line(line):
vec = line.strip().split("\t")
assert len(vec)>=3
aligned = int(vec[0])
image_path = vec[1]
label = int(vec[2])
bbox = None
landmark = None
#print(vec)
if len(vec)>3:
bbox = np.zeros( (4,), dtype=np.int32)
for i in xrange(3,7):
bbox[i-3] = int(float(vec[i]))
landmark = None
if len(vec)>7:
_l = []
for i in xrange(7,17):
_l.append(float(vec[i]))
landmark = np.array(_l).reshape( (2,5) ).T
#print(aligned)
return image_path, label, bbox, landmark, aligned
It seems like aligned accepts a number(probably 0 or 1). Hence, I guess the format of a line in .lst file will be:
aligned img_path age bbox_x1 bbox_y1 bbox_x2 bbox_y2 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10
Am I correct? If not, then please provide the right way to do it.
Also, after creating .lst file, should I use face2rec.py as it is to create .rec file
Issue Analytics
- State:
- Created 5 years ago
- Comments:15
Top GitHub Comments
The contribution is very welcome. You can contact me via email~
Hello guys @nttstar @xizi @eeric @prashantg445 @zhangxiaopang88 . Thanks! This repo is awsome! pretrained models for age gender trained using mobilenet or is there other backbone used? I got “Incompatible attr in node at 0-th output: expected [256], got [1024]” error while using pretrained weights to start training