This service provides endpoints for retrieving the bounding box of the motif i.e. the main subject of a given 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/motif_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/motif_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. Note: use the "debug" version of a make job to get the debug base64 image in the response.
Example images used in the tests are from Unsplash: