Skip to content

A simple gRPC Python client for communicating with gRPC server for various object detection service.

License

Notifications You must be signed in to change notification settings

MABatin/grpc-objdet_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Object Detection Client

A simple gRPC Python client for communicating with gRPC server for various object detection service. Supports both image and video input, as well as saving detection results in an output video file.

Installation


Use Python version 3.10

Conda Environment

Make sure to have anaconda or miniconda installed

  1. conda create -n grpcenv python=3.10
  2. conda activate grpcenv
  3. cd grpc-ml-server
  4. pip install -r requirements.txt

Virtualenv

  1. cd grpc-ml-server
  2. pip3 install virtualenv (if virtualenv is not installed)
  3. python3 -m virtualenv venv
  4. source venv/bin/activate
  5. pip install -r requirements.txt

Compile proto file

When accessing a new service, proto file should be compiled with the following command:
bash compile_proto.sh [SERVICE_NAME]

Running the client


python client.py --host <HOST> --port <PORT> --input <PATH_TO_INPUT>
[OPTIONAL] --output <PATH_TO_OUTPUT> --out-fps <FPS> --classes <LIST_OF_CLASSES> --show

TODO


  • Implement showing of stream output
  • Add debug option for debug output to console
  • Add support for logging to file
  • Add support for sending batch of images
  • Add environment variables
  • Add docker support for deployment

Future plans for improvements

  • Process response with detection metadata for further functionality
  • Download .proto files of a service directly from server
  • Implement queue for improved performance (maybe)

Contributions are welcome 😃

About

A simple gRPC Python client for communicating with gRPC server for various object detection service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published