HamadYA / GhostFaceNets

This repository contains the official implementation of GhostFaceNets, State-Of-The-Art lightweight face recognition models.
https://ieeexplore.ieee.org/document/10098610
MIT License
194 stars 38 forks source link

unable to fix this issue ValueError: need at least one array to concatenate when getting emeddings for known faces #35

Closed Pratik-Ghute closed 11 months ago

Pratik-Ghute commented 11 months ago

/GhostFaceNets/video_test.py", line 86, in embedding_images embeddings = normalize(np.concatenate(embeddings, axis=0)) ValueError: need at least one array to concatenate

HamadYA commented 11 months ago

/GhostFaceNets/video_test.py", line 86, in embedding_images embeddings = normalize(np.concatenate(embeddings, axis=0)) ValueError: need at least one array to concatenate

Hi,

Most probably your face detector did not detect any faces in the image.

HamadYA commented 11 months ago

/GhostFaceNets/video_test.py", line 86, in embedding_images embeddings = normalize(np.concatenate(embeddings, axis=0)) ValueError: need at least one array to concatenate

Hi,

Did you pass the below and do you have the same folder structure as below:

parser.add_argument("-k", "--known_user", type=str, default=None, help="Folder containing user images data") parser.add_argument("-K", "--known_user_force", type=str, default=None, help="Folder containing user images data, force reload")

Your command should be: !python video_test.py -m checkpoints/GN_W0.5_S2_ArcFace_epoch16.h5 -k path/to/know_user_images

The folder structure should be:

images -- 1 -- -- image1.jpg -- -- image2.jpg -- -- etc

Try and let me know

Pratik-Ghute commented 11 months ago

Yes, thanks for your attention, after posting issue I figured out this !

On Thu, Dec 7, 2023, 10:17 AM HamadYA @.***> wrote:

/GhostFaceNets/video_test.py", line 86, in embedding_images embeddings = normalize(np.concatenate(embeddings, axis=0)) ValueError: need at least one array to concatenate

Hi,

Did you pass the below and do you have the same folder structure as below:

parser.add_argument("-k", "--known_user", type=str, default=None, help="Folder containing user images data") parser.add_argument("-K", "--known_user_force", type=str, default=None, help="Folder containing user images data, force reload")

Your command should be: !python video_test.py -m checkpoints/GN_W0.5_S2_ArcFace_epoch16.h5 -k path/to/know_user_images

The folder structure should be:

images -- 1 -- -- image1.jpg -- -- image2.jpg -- -- etc

Try and let me know

— Reply to this email directly, view it on GitHub https://github.com/HamadYA/GhostFaceNets/issues/35#issuecomment-1844375225, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ADTIDC5VQMFGX57FWHCLLYIFC5NAVCNFSM6AAAAABABGMVA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMRSGU . You are receiving this because you authored the thread.Message ID: @.***>

HamadYA commented 11 months ago

Yes, thanks for your attention, after posting issue I figured out this ! On Thu, Dec 7, 2023, 10:17 AM HamadYA @.> wrote: /GhostFaceNets/video_test.py", line 86, in embedding_images embeddings = normalize(np.concatenate(embeddings, axis=0)) ValueError: need at least one array to concatenate Hi, Did you pass the below and do you have the same folder structure as below: parser.add_argument("-k", "--known_user", type=str, default=None, help="Folder containing user images data") parser.add_argument("-K", "--known_user_force", type=str, default=None, help="Folder containing user images data, force reload") Your command should be: !python video_test.py -m checkpoints/GN_W0.5_S2_ArcFace_epoch16.h5 -k path/to/know_user_images The folder structure should be: images -- 1 -- -- image1.jpg -- -- image2.jpg -- -- etc Try and let me know — Reply to this email directly, view it on GitHub <#35 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ADTIDC5VQMFGX57FWHCLLYIFC5NAVCNFSM6AAAAABABGMVA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMRSGU . You are receiving this because you authored the thread.Message ID: @.>

Noted, I am closing this issue. Feel free to reopen or open a new issue if you have any question.