https://github.com/mongodb-industry-solutions/Insurance-image-search
https://github.com/mongodb-industry-solutions/Insurance-image-search
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mongodb-industry-solutions/Insurance-image-search
- Owner: mongodb-industry-solutions
- Created: 2023-09-19T10:42:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-14T11:26:45.000Z (over 1 year ago)
- Last Synced: 2024-08-09T02:17:20.038Z (8 months ago)
- Language: Jupyter Notebook
- Size: 741 KB
- Stars: 12
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - mongodb-industry-solutions/Insurance-image-search - (Jupyter Notebook)
README
# Insurance-image-search
The python notebook included in this repository contains a basic script that lets the user perform similarity search using [Atlas Vector Search](https://www.mongodb.com/products/platform/atlas-vector-search).
The steps outlined in the code are the following:1. Define an image embedder based on the pytorch version of squeezenet
2. Download and save to file the public "car damage" dataset. The dataset contains images of car damages. Make you move the folder from your downloads into the same folder as your GitHub repo.
3. Connect to MongoDB Atlas. Replace the code with your username, password and cluster.
4. Create the Search index in Atlas following the instructions of [this](https://www.mongodb.com/developer/products/atlas/building-generative-ai-applications-vector-search-open-source-models/?hideMenu=1) tutorial (Step 4) and using the following configuration```json
{
"mappings": {
"dynamic": true,
"fields": {
"embedding": {
"dimensions": 1000,
"similarity": "cosine",
"type": "knnVector"
}
}
}
}
```6. Get image embeddings and load them to Atlas
7. Type "crashed windshield" or anything related to car accidents into Google Image search and save one of the images into the car_damage folder with the name test.jpg.
8. Run an image similarity queryHere's an example of a query of an image found online

And its output
