GithubHelp home page GithubHelp logo

learningcode's Introduction

CMC_rank

CMC.py 中通过 from CMC_rank.CMC_data_file import CMC.py 进行内部的计算

每当要加入新的数据时。

  1. 初始化 test_cmcno = []
  2. test_cmcno = CMC(label_root, list_root, class_num)
  3. test_cmcno = np.array(test_cmcno)
  4. ...
  5. plt.plot(...)

insightface_pytorch_datasets_make

Insightface_pytorch版本的自定义数据准备过程

制作 .lst : 注意路径问题

python make_lst.py --dataset-dir D:\PycharmProjects\LearningProject\insightface_pytorch_datasets_make\EAR_train --list-file D:\PycharmProjects\LearningProject\insightface_pytorch_datasets_make\lst\train.lst --img-ext '.bmp'

创建property文件,注意不要有后缀

在文件中输入:class_num,112,112

class_num 代表类别个数

112,112 代表图片尺寸

生成rec & idx 文件

运行face2rec.py (同时注意:需要 face_image.py 和 face_preprocess.py文件) 也可以通过:

python face2rec.py --prefix D:\PycharmProjects\LearningProject\insightface_pytorch_datasets_make\dataset_file\lst --root D:\PycharmProjects\LearningProject\insightface_pytorch_datasets_make\dataset_file\EAR_train 

的方式进行。

生成 pairs.txt 文件

python generate_image_pairs.py --data-dir D:\PycharmProjects\LearningProject\
insightface_pytorch_datasets_make\dataset_file\EAR_train --outputtxt D:\PycharmProjects\LearningProject\insightface_pytorch_datasets_make\dataset_file\lst\pairs.txt

生成 .bin 文件

--data-dir: .lst 文件路径

python lfw2pack.py --data-dir D:\PycharmProjects\LearningProject\insightface_pytorch_datasets_make\dataset_file\lst --output D:\PycharmProjects\
LearningProject\insightface_pytorch_datasets_make\dataset_file\lst\EAR.bin --num-samepairs 11000

learningcode's People

Contributors

artintel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.