shobhit9618 / celeb_recognition Goto Github PK
View Code? Open in Web Editor NEWModel to recognize celebrities using a face matching algorithm.
License: MIT License
Model to recognize celebrities using a face matching algorithm.
License: MIT License
Index size is not a multiple of vector size. Ensure you are opening using the same metric you used to create the index.: No error (0)
Traceback (most recent call last):
File "C:\CelebDetector\test.py", line 4, in
celeb_detector.celeb_recognition(img_path)
File "C:\CelebDetector\venv\lib\site-packages\celeb_detector\celeb_recognition.py", line 37, in celeb_recognition
pred, img_out = get_celeb_prediction(img, ann_filepath, celeb_mapping_path)
File "C:\CelebDetector\venv\lib\site-packages\celeb_detector\celeb_utils.py", line 85, in get_celeb_prediction
_ = ann_index.load(ann_filepath)
OSError: Index size is not a multiple of vector size. Ensure you are opening using the same metric you used to create the index.: No error (0)
Hello,
I have a hard time trying to make the Google Colab works.
encoder_model = torch.load(vggface_modelpath)
Give this error:
FileNotFoundError Traceback (most recent call last)
[<ipython-input-6-f7e8409fb9ee>](https://localhost:8080/#) in <cell line: 1>()
----> 1 encoder_model = torch.load(vggface_modelpath)
2 ann_index = AnnoyIndex(2048, 'angular')
3 _ = ann_index.load(celeb_index_annpath)
2 frames
[/usr/local/lib/python3.10/dist-packages/torch/serialization.py](https://localhost:8080/#) in __init__(self, name, mode)
424 class _open_file(_opener):
425 def __init__(self, name, mode):
--> 426 super().__init__(open(name, mode))
427
428 def __exit__(self, *args):
FileNotFoundError: [Errno 2] No such file or directory: 'celeb_detector/models/vggface_resnet50.pt'
I can't find this file anywhere on the the repo. I need to download it somewhere?
Thanks!
import celeb_detector # on running for the first time, this will download vggface model
# img_path = 'sample_image.jpg' # this supports both local path and web url like https://sample/sample_image_url.jpg
img_path = 'Alia_Bhatt_promoting_Kalank.jpg' # this supports both local path and web url like https://sample/sample_image_url.jpg
celeb_detector.celeb_recognition(img_path) # on running for the first time, 2 files (celeb_mapping.json and celeb_index_60.ann) will downloaded to your home directory
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-17-d0e4e36cb43e>](https://localhost:8080/#) in <cell line: 4>()
2 # img_path = 'sample_image.jpg' # this supports both local path and web url like https://sample/sample_image_url.jpg
3 img_path = 'Alia_Bhatt_promoting_Kalank.jpg' # this supports both local path and web url like https://sample/sample_image_url.jpg
----> 4 celeb_detector.celeb_recognition(img_path) # on running for the first time, 2 files (celeb_mapping.json and celeb_index_60.ann) will downloaded to your home directory
AttributeError: module 'celeb_detector' has no attribute 'celeb_recognition'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.