PymvDB
1.0.0

PYMVDBは、画像用のベクトルデータベースを作成および管理するために設計されたPythonライブラリです。抱きしめるフェイスイメージ機能抽出モデルをエンコーダとして使用する機能が備わっています。
Google/vit-base-patch16-224-in21kで実行するには0.41秒かかります。
PIPを使用してPYMVDBをインストールできます(近日公開):
pip install pymvdbPIPで公開するのを待っている間に、次を使用して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 )StartingPointファイルを使用して、簡単な例を実行できます。ここで使用されるすべての画像は、ウィキペディアから来ています
python StartingPoint.py Test_car.jpg