diff --git a/README.md b/README.md index bae5bb3834035a0b786e963d4e6fe4c72acdd72b..6f8848b87eac4322974e8f7bea2bd5156add210d 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,28 @@ curl -H "Content-Type:application/json" -X POST -d '{"words": "我爱北京天

Image Classification

+- **Description**: Image classification trained with Imagenet dataset. A label and corresponding probability will be returned. + +- **Download**: +``` shell +wget --no-check-certificate https://paddle-serving.bj.bcebos.com/imagenet-example/imagenet_demo.tar.gz +``` +- **Host web service**: +``` shell +tar -xzf imagenet_demo.tar.gz +python image_classification_service_demo.py resnet50_serving_model +``` +- **Request sample**: +``` shell +curl -H "Content-Type:application/json" -X POST -d '{"url": "https://paddle-serving.bj.bcebos.com/imagenet-example/daisy.jpg", "fetch": ["score"]}' http://127.0.0.1:9292/image/prediction +``` +- **Request result**: +``` shell +{"label":"daisy","prob":0.9341403245925903} +``` + + +

Document