PymvDB
1.0.0

PymVDB هي مكتبة Python مصممة لإنشاء وإدارة قاعدة بيانات متجه للصور. إنه يأتي مع القدرة على استخدام نماذج استخراج ميزة صورة الوجه المعانقة كرسومات تشفير.
تشغيله مع Google/VIT-Base-Patch16-224-In21K يستغرق 0.41 ثانية لتشفير صورة على الجهاز الخاص بي (Ryzen 7 2700)
يمكنك تثبيت pymvdb باستخدام PIP (قريبًا):
pip install pymvdbأثناء انتظار نشره على PIP ، يمكنك تنزيل وتثبيت pymvdb باستخدام:
git clone https://github.com/BBurgarella/PymvDB.git
cd PymvDB
pip install . # Initialize the client with an embedding model
embedding_model = YourEmbeddingModel () # Replace with your actual embedding model
db = Client ( embedding_model , persistent_path = 'database.sqlite' )
# Create a new collection
collection = db . create_collection ( Name = 'my_collection' )
# Add an image to the collection
collection . add_image ( 'path/to/image' , metadata = { "..." })
# Find similar images
target_image = Image . open ( 'path/to/target_image' )
similar_images = collection . find_similar_images ( target_image , top_N = 5 )
print ( similar_images )يمكنك تشغيل مثال سريع باستخدام ملف STARTEPOINT. جميع الصور المستخدمة هنا تأتي من ويكيبيديا
python StartingPoint.py Test_car.jpg