Skip to content

Instantly share code, notes, and snippets.

@HViktorTsoi
Last active May 1, 2019 17:06
Show Gist options
  • Save HViktorTsoi/6309b99b1d0347ad26f56580d8eadf82 to your computer and use it in GitHub Desktop.
Save HViktorTsoi/6309b99b1d0347ad26f56580d8eadf82 to your computer and use it in GitHub Desktop.
insight face 生成自己的数据集

首先将数据集组织成

|--数据集名称

|--人脸ID_1

  |--人脸ID_1的脸部图像.jpg

  |--人脸ID_1的脸部图像.jpg

  |--...

|--人脸ID_2

  |--人脸ID_2的脸部图像.jpg

  |--人脸ID_2的脸部图像.jpg

  |--...

|--...
|--...

的形式,然后

cd /path/to/insightface/src/data

执行

python dir2lst.py /path/to/数据集名称 > ../../datasets/数据集名称/train.lst

生成train集的lst

test集的生成方式相同。

然后执行

python face2rec2.py ../../datasets/数据集名称/train

生成训练集

test集的生成方式相同。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment