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 )คุณสามารถเรียกใช้ตัวอย่างด่วนโดยใช้ไฟล์ artialpoint ภาพทั้งหมดที่ใช้ที่นี่มาจาก Wikipedia
python StartingPoint.py Test_car.jpg