Coder Social home page Coder Social logo

paul-pias / face-recognition Goto Github PK

View Code? Open in Web Editor NEW
77.0 4.0 28.0 25.89 MB

Face Recognition using pre-trained model built-on Arcface was implemented on Pytorch.

Python 99.73% HTML 0.27%
facerecognition face-recognition face-recogniton-arcface arcface-pytorch insightface-pytorch arcface

face-recognition's Issues

Question about verification protocol

Hi. I am YJHong and thanks for sharing your great work!

My questions are:

  • Why using l2 metric instead of cosine similarity when doing the verification ?
  • When I use cosine similairty for verification using your pretrained model (IRSE50 / mobilefacenet both), its performance even worse than VGGFaceNet (trained by simple soft-max). Is this due to cosine similarity ?
  • About preprocess: 1) bbox using face detector - 2) plus margin - 3) resize to 112,112 - -4) ToTensor (divide by 255) - 5) Normalize (0.5,0.5,0.5) -> -> this right ?

Error downloading data/facebank/facebank.pth

Error downloading object: data/facebank/facebank.pth (12f2be5): Smudge error: Error downloading data/facebank/facebank.pth (12f2be55177b222cedc8853565bffddfa1343f5b64fd516ea4f87924210eeb7d): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

the facebank.pth cannot be download

git clone then shows error: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

IDE

Hi ...,
which IDE are you using?
Best regards,
PeterPham

Cannot train a custom dataset on CPU

After following the steps as outlined while trying to train a custom dataset, I got the error shown below:

File "./create-dataset/align_dataset_mtcnn.py", line 160, in
main(parse_arguments(sys.argv[1:]))
File "./create-dataset/align_dataset_mtcnn.py", line 56, in main
pnet, rnet, onet = align.detect_face.create_mtcnn(sess, None)
File "/home/ezichi/pytorch_awesome/create-dataset/align/detect_face.py", line 283, in create_mtcnn
pnet.load(os.path.join(model_path, 'det1.npy'), sess)
File "/home/ezichi/pytorch_awesome/create-dataset/align/detect_face.py", line 85, in load
data_dict = np.load(data_path, encoding='latin1').item() #pylint: disable=no-member
File "/home/ezichi/pytorch_awesome/pytorch_awesome/lib/python3.8/site-packages/numpy/lib/npyio.py", line 430, in load
return format.read_array(fid, allow_pickle=allow_pickle,
File "/home/ezichi/pytorch_awesome/pytorch_awesome/lib/python3.8/site-packages/numpy/lib/format.py", line 742, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False.

How can I resolve it?

facebank.pth

This file is not available anymore. Could you please upload it somewhere?

how to increase epochs ?

hi!

We are training about 4 million images in a huge dataset.
The default training value is insufficient for performance.
I want to add more epochs

thanks!

Facing the following issue

I am facing the following error. I have tried to update the path of the facebank.pth in the utils.py file. Can you suggest any `solution??

arcface loaded
{'data_path': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank'), 'work_path': PosixPath('work_space'), 'model_path': PosixPath('work_space/models'), 'log_path': PosixPath('work_space/log'), 'save_path': PosixPath('work_space/save'), 'input_size': [112, 112], 'embedding_size': 512, 'use_mobilfacenet': False, 'facebank_path': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/facebank'), 'net_depth': 50, 'drop_ratio': 0.6, 'net_mode': 'ir_se', 'device': device(type='cuda', index=0), 'test_transform': Compose(
ToTensor()
Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
), 'data_mode': 'emore', 'vgg_folder': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/faces_vgg_112x112'), 'ms1m_folder': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/faces_ms1m_112x112'), 'emore_folder': PosixPath('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/faces_emore'), 'batch_size': 100, 'threshold': 1.5, 'face_limit': 10, 'min_face_size': 35}
ir_se_50 model opened
learner loaded
Traceback (most recent call last):
File "app.py", line 5, in
from face_verify import faceRec
File "/home/intisar/Documents/arcface/Face-Recognition-master/face_verify.py", line 39, in
targets, names = load_facebank(conf)
File "/home/intisar/Documents/arcface/Face-Recognition-master/utils.py", line 71, in load_facebank
embeddings = torch.load('/home/intisar/Documents/arcface/Face-Recognition-master/data/facebank/facebank.pth')
File "/home/intisar/miniconda3/envs/arcface/lib/python3.7/site-packages/torch/serialization.py", line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/intisar/miniconda3/envs/arcface/lib/python3.7/site-packages/torch/serialization.py", line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.

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.