Visual Explanations#
Build | |
---|---|
Backend | |
Frontend |
Components#
- Predictions are provided by a MobileNetV2 model pre-trained on ImageNet and fine-tuned on task-specific samples
- Backend microservice built with FastAPI
- Frontend created with VueJS utilizing the Advanced Cropper component
Environment Variables#
Variable | Description | Default Value |
---|---|---|
SERVICE_NAME |
The name that the app uses as its identifier, e.g. when logging or emitting traces | "inspection-service" |
ROOT_PATH |
FastAPI root path (doc) | "" |
PATH_PREFIX |
FastAPI router prefix (doc) | "" |
DEFAULT_EXPLAINER |
The explanation generator to use if a request does not speficy one | "lime" |
LOG_INPUT |
Save input images to disk | False |
LOG_PATH |
Path to store the logged images | ./log |
Running the service locally (with Docker)#
To launch a standalone instance of the service:
Running the service locally (without Docker)#
During development, it can be desirable to launch the service directly and not as a Docker container. For instance, this allows to get rapid feedback on changes to the backend code.
Log input images#
For development purposes, the service can be configured to write the raw input images to disk.
This setting is controlled through the environment variable LOG_INPUT
:
By default, the images are collected in a sub-folder ./log
.
To change where the images are saved to, set the environment variable LOG_PATH
, e.g.: