Classify a handwritten zero
This endpoint classifies an image of a handwritten zero
that has been provided by DJL. A neural network trained on the
MNIST database of handwritten digits performs the classification.
The first invocation of Classify a handwritten zero or Classify a handwritten number trains the image recognition model, which takes approximately 10 - 20 seconds. The model is then cached for efficient subsequent invocations. Observe the training delay in the logs: Training: 100% |████████████████████████████████████████| Epoch 1 finished. Training: 100% |████████████████████████████████████████| Epoch 2 finished. |
Request
Send the following empty POST request:
POST /handwriting-recogniser/classify-handwritten-zero
Response
Data is truncated for readability. |
Notice that the image is recognised as 0
, with a high probability of correctness:
Response
{
"handwrittenNumber": "0",
"probabilities": [
{
"handwrittenNumber": "0",
"probability": 0.9999525547
},
{
"handwrittenNumber": "2",
"probability": 0.0000418071
},
{
"handwrittenNumber": "6",
"probability": 0.0000029869
}
]
}