PymvDB
1.0.0

PYMVDB는 이미지의 벡터 데이터베이스를 작성하고 관리하도록 설계된 파이썬 라이브러리입니다. 포옹 얼굴 이미지 기능 추출 모델을 인코더로 사용할 수있는 기능이 제공됩니다.
Google/vit-base-patch16-224-in21k로 실행하면 컴퓨터에서 이미지를 인코딩하는 데 0.41 초가 걸립니다 (Ryzen 7 2700)
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 )시작점 파일을 사용하여 빠른 예제를 실행할 수 있습니다. 여기에 사용 된 모든 이미지는 Wikipedia에서 나옵니다
python StartingPoint.py Test_car.jpg