leondgarse / Keras_insightface

Insightface Keras implementation
MIT License
230 stars 56 forks source link

Evaluation Script #128

Closed KerasQA closed 7 months ago

KerasQA commented 7 months ago

Thanks for this amazing repo. Could you please provide:

1) an evaluation script of two images if they are the same person or not 2) an evaluation script that takes an image as an input and search for the top similar persons in multiple images directories

leondgarse commented 7 months ago
KerasQA commented 7 months ago
  • The video_test.py is updated to image_video_test.py, which can be used testing either images or video input.
  • Comparing images
    python image_video_test.py --images test1.jpg test2.jpg test3.jpg
    # >>>> image_path: test1.jpg, faces count: 1
    # >>>> image_path: test2.jpg, faces count: 1
    # >>>> image_path: test3.jpg, faces count: 1
    # cosine_similarities: [[1.0000001 1.0000001 1.0000001]
    #  [1.0000001 1.0000001 1.0000001]
    #  [1.0000001 1.0000001 1.0000001]]
  • Search in known users
    python image_video_test.py --images test.jpg --known_users test
    # >>>> image_classes info:
    # 0  10
    # 1  10
    # ...
    # recognition_similarities: [0.47837412]
    # recognition_classes: ['9']
    # bbs: [[176.56265   54.588932 272.8746   181.40137 ]]
    # ccs: [0.8820559]
    # >>>> Saving result to: test_recognition_result.jpg
  • Video test
    python image_video_test.py --known_users test --video_source 0
  • May import or modify it for your own usage.

Noted with thanks, I will check and get back to you if something happened.

Thanks for your support and time.