diff --git a/demos/image_classification/cpp/README.md b/demos/image_classification/cpp/README.md index c19147410c..a1b3e95006 100644 --- a/demos/image_classification/cpp/README.md +++ b/demos/image_classification/cpp/README.md @@ -36,20 +36,43 @@ docker run -d -u $(id -u):$(id -g) -v $(pwd)/resnet50-binary:/model -p 9001:9001 ## Start the client: ```bash -docker run --rm --network host -e "no_proxy=localhost" ovms_cpp_image_classification ./classification_client_sync --grpc_port=9001 --iterations=10 --layout="binary" +docker run --rm --network host -e "no_proxy=localhost" -v ${PWD}/input_images.txt:/clients/input_images.txt ovms_cpp_image_classification ./classification_client_sync --grpc_port=9001 --iterations=10 --layout="binary" +Address: localhost +Images list path: input_images.txt +Layout: binary +call predict ok +call predict time: 6ms +outputs size is 1 +call predict ok +call predict time: 5ms +outputs size is 1 +call predict ok +call predict time: 4ms +outputs size is 1 +call predict ok +call predict time: 4ms +outputs size is 1 +call predict ok +call predict time: 4ms +outputs size is 1 +call predict ok +call predict time: 4ms +outputs size is 1 +call predict ok +call predict time: 5ms +outputs size is 1 call predict ok -call predict time: 24ms +call predict time: 4ms outputs size is 1 call predict ok -call predict time: 23ms +call predict time: 4ms outputs size is 1 call predict ok -call predict time: 23ms +call predict time: 5ms outputs size is 1 -... -Overall accuracy: 90% -Total time divided by number of requests: 25ms +Overall accuracy: 100% +Total time divided by number of requests: 5ms ``` # Clients requesting predictions asynchronously @@ -83,7 +106,7 @@ docker run -d -u $(id -u):$(id -g) -v $(pwd)/resnet50-binary:/model -p 9001:9001 ### Start the client: ```bash -docker run --rm --network host -e "no_proxy=localhost" ovms_cpp_image_classification ./classification_client_async_benchmark --grpc_port=9001 --layout="nchw" --iterations=2000 --batch_size=1 --max_parallel_requests=100 --consumers=8 --producers=1 --benchmark_mode=1 +docker run --rm --network host -e "no_proxy=localhost" -v ${PWD}/input_images.txt:/clients/input_images.txt ovms_cpp_image_classification ./classification_client_async_benchmark --grpc_port=9001 --layout="nchw" --iterations=2000 --batch_size=1 --max_parallel_requests=100 --consumers=8 --producers=1 --benchmark_mode=1 Address: localhost:9001 Model name: resnet @@ -103,4 +126,4 @@ Producer threads: 1 Consumer threads: 8 Max parallel requests: 100 Avg FPS: 1012.15 -``` \ No newline at end of file +``` diff --git a/demos/image_classification/cpp/input_images.txt b/demos/image_classification/cpp/input_images.txt new file mode 100644 index 0000000000..1f72df84d6 --- /dev/null +++ b/demos/image_classification/cpp/input_images.txt @@ -0,0 +1,10 @@ +images/airliner.jpeg 404 +images/arctic-fox.jpeg 279 +images/bee.jpeg 309 +images/golden_retriever.jpeg 207 +images/gorilla.jpeg 366 +images/magnetic_compass.jpeg 635 +images/peacock.jpeg 84 +images/pelican.jpeg 144 +images/snail.jpeg 113 +images/zebra.jpeg 340