This project demonstrates how to build a Dockerized image search application using gRPC for communication between client and server components. The server utilizes a machine learning model to analyze user queries and return relevant images.
The application consists of two main components:
- Deploys a machine learning model for image analysis.
- Responds to client requests with matching images.
- Sends image search queries to the server.
- Receives and displays the server's response (image).
- Docker installed and running on your system.
- Python 3.9 or higher.
Step 1: Clone the Repository
Clone this repository to your local machine. Use code with caution.
Step 2: Build Docker Images
Navigate into the project's root directory and build the Docker images for both the server and the client.
cd image-search-docker
# Build server image
docker build -t my-server-image ./server
# Build client image
docker build -t my-client-image ./clientStep 1: Start the Server
Run the following command to start the server container:
docker run -d --network=host my-server-imageStep 2: Start the Client
Run the following command to start the client container in interactive mode:
docker run -it --network=host -v $PWD:/app my-client-imageInside the client container, enter a query keyword and press enter. The client will send the query to the server, which will return a matching image. The image will be saved to the client directory as image.jpg.
You can modify the following aspects of the application to suit your needs:
Machine Learning Model: The server's model.py script can be updated to use a different machine learning model for image analysis. Query Logic: The server's server.py script can be modified to implement different query logic. Docker Images: The Dockerfiles in the server and client directories can be customized to include additional dependencies or configurations. Next Steps
Explore integrating a more sophisticated machine learning model for improved image analysis. Add support for multiple clients to send queries to the server concurrently. Deploy the application to a cloud platform for scalability and availability. Contributing
Contributions to this project are welcome! Please make sure to read the contributing guidelines before submitting a pull request.
This project is licensed under the MIT License.
dhushyanth-h-m/Multi-threaded-Image-Search-Engine
| 7 Tools used |
07/24/24 Report generated |
|---|
|
Python |
|
Protobuf v4.24.4 |
|
Docker |
Git |
PyPI |
|
TensorFlow v2.13.0 |
| NAME | VERSION | LAST UPDATED | LAST UPDATED BY | LICENSE | VULNERABILITIES |
|---|---|---|---|---|---|
| grpcio | v1.59.0 | 10/17/23 | Dhushyanth | Apache-2.0 | N/A |
Generated via Stack File