question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to create .lst file for this project

See original GitHub issue

Hi @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:closed
  • Created 5 years ago
  • Comments:15

github_iconTop GitHub Comments

2reactions
nttstarcommented, Aug 23, 2018
  1. Yes, the first column indicates whether face images in this lst were already aligned, it should be 0 or 1.
  2. Reply to you later.
  3. Bounding box and landmark locations are not required if you already aligned them.
  4. Now it should be absolute path.

The contribution is very welcome. You can contact me via email~

0reactions
RamatovInomjoncommented, Jul 27, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a File-List using the Windows command prompt.
LST file ) into the Hurricane /DATA/ directory. First launch the Windows command line by clicking the START button, then click RUN, then...
Read more >
How do I generate a .lst file from my assembly project? - MSDN
After I build my project, I can't find the .lst file anywhere . Using what? ... Using Visual C++ 2010 Express under Debug...
Read more >
how to generate lst file
Hi to all, i went to Project->Build options->project->MPLINK Linker tab, and uncheck "Suppress COD file generation" option. but counldnt ...
Read more >
Create a .lst file for machine learning image classification on ...
lst file. Simply copy and paste this script into your images dataset folder and change the: path name of your two categories of...
Read more >
LST File Extension - What is an .lst file and how do I open it?
Since LST files are saved in a plain text format, they can be viewed and edited with a basic text editor. On rare...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found