You'll need to install:
Install the dependencies
$ just setup
$ poetry run ./ova.py detection /path/to/image
The available options for the cli:
$ poetry run ./ova.py detection --help
Usage: ova_client.py detection [OPTIONS] IMAGE
Options:
-s, --save Save the output image.
-v, --visualize Draw bounding boxes on the detected objects.
--help Show this message and exit.
$ pip install --user httpie
$ http -f POST https://api.openvisionapi.com/api/v1/detection model="yolov4" image@images/cat.jpeg
{
"description": "Detected objects",
"predictions": [
{
"bbox": {
"x1": 442,
"x2": 982,
"y1": 199,
"y2": 1270
},
"label": "cat",
"score": "0.93"
}
]
}
$ curl -X POST https://api.openvisionapi.com/api/v1/detection \
-F "model=yolov4" \
-F "image=@images/cat.jpeg"
{
"description": "Detected objects",
"predictions": [
{
"bbox": {
"x1": 442,
"x2": 982,
"y1": 199,
"y2": 1270
},
"label": "cat",
"score": "0.93"
}
]
}
The configuration can be set up using the following env variables:
OVA_DETECTION_URL : The URL to the OpenVisionAPI server. The default is https://api.openvisionapi.com/api/v1/detection
OVA_OUTPUT_DIR : The directory where to store the result. The default is ./output
Your contributions are welcome !
To setup the development environment, simply run this command
$ just dev
ruff and mypy are used to ensure that contributions are stylized in a uniform manner.
To run the tests, simply run those commands
$ just dev
$ just test
AGPLv3