Utility to visualize coordinates-detecting ML models results
Checkout image on Docker Hub: https://hub.docker.com/r/deniskrumko/visual-coordinates-tool
docker pull deniskrumko/visual-coordinates-tool:latest
To run services with configuration - create config
folder with .toml
configuration file and mount it to /usr/local/bin/config
(config example is bellow in README):
docker run --rm -v $(pwd)/config/:/usr/local/bin/config -p 8080:8080 \
deniskrumko/visual-coordinates-tool:latest --config config/test.toml
To run services without configuration:
docker run --rm -p 8080:8080 deniskrumko/visual-coordinates-tool:latest
If your service accepts JSON requests with image URL then specify template using which request can be performed.
For example: {"inputs": "%s"}
.
NOTE: %s
is used to define where image URL will be passed.
Also you need to check JSON Request checkbox in near Get coordinates button.
If your service accepts form-data requests, then put field name in "Request" section.
For example: photo
.
Also you need to uncheck JSON Request checkbox in near Get coordinates button.
For example, you service responds with JSON like this:
{
"success": true,
"data": {
"coordinates": [
{"x": 100, "y": 200},
{"x": 200, "y": 300}
]
}
}
Then you need to specify in Response section that field data.coordinates
contains pairs of x-y coordinates.
NOTE: Currently visual-coordinates-tool supports only JSON responses and only pairs of {"x": ..., "y": ...}
coordinates.
[common]
# Name of the service to display in UI
name = "Cars Coordinates Testing"
# List of predefined service configurations to use
[services]
[services.my-service-1]
name = 'Service that uses JSON'
group = 'My services'
url = 'https://path-to-endpoint'
request_json_template = '{"inputs": "%s"}'
response_xy_field = 'coords'
[services.my-service-2]
name = 'Service that uses formdata'
group = 'My services'
url = 'http://path-to-endpoint'
request_formdata_field = 'photo'
response_xy_field = 'result.coords'
default = true
# List of image samples
[samples]
prefix = 'https://images-bucket-example.com/'
images = [
'cars/1.jpg',
'cars/2.jpg',
'cars/3.jpg',
'-', # will act as divider
'trucks/4.jpg',
'trucks/5.jpg',
]
Service fields:
name
- service namegroup
- group nameurl
- path to endpointrequest_json_template
– predefined JSON request templaterequest_formdata_field
– predefined form-data request fieldresponse_xy_field
– predefined response field with coordinatesdefault
– use this service by default or not