This service provides endpoints for retrieving captions based on a given image.
Apart from providing just an input image, the service also accepts a bounding box to generate a caption based on a cropped version image.
Please refer to the proto file for more information on the service's API.
- Python 3.11.7
- I recommend to using pyenv to manage python versions
- gRPCurl
- Make (optional)
- should be pre-installed on most Unix-like systems
- Clone this repository and navigate to the root directory.
- Navigate to the
services/caption_service
directory. - Set up a python virtual environment with the pre-configured make command.
- Install the required dependencies to the virtual environment.
- Start the service. (optionally edit the make file to change the port or disable debug mode)
The above steps can be executed with the following commands:
git clone https://github.com/nico-i/photo-ops.git
cd photo-ops
cd services/caption_service
make venv
make install
make dev
If you have followed the setup instructions above, you can utilize the configured make commands to execute the example requests.
Please refer to the make file or the table below for the available make commands.
Example images used in the tests are from Unsplash: