{"id":16860891,"url":"https://github.com/tataganesh/tf-serving-cnn-example","last_synced_at":"2025-07-31T02:03:08.707Z","repository":{"id":39730596,"uuid":"201974037","full_name":"tataganesh/TF-Serving-CNN-example","owner":"tataganesh","description":"Basic example of Tensorflow Serving","archived":false,"fork":false,"pushed_at":"2022-12-08T03:38:54.000Z","size":20047,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T11:31:51.214Z","etag":null,"topics":["model-deployment","serving","tensorflow-serving"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tataganesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-12T17:03:48.000Z","updated_at":"2024-02-29T04:53:09.000Z","dependencies_parsed_at":"2023-01-25T04:16:03.365Z","dependency_job_id":null,"html_url":"https://github.com/tataganesh/TF-Serving-CNN-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tataganesh/TF-Serving-CNN-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tataganesh%2FTF-Serving-CNN-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tataganesh%2FTF-Serving-CNN-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tataganesh%2FTF-Serving-CNN-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tataganesh%2FTF-Serving-CNN-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tataganesh","download_url":"https://codeload.github.com/tataganesh/TF-Serving-CNN-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tataganesh%2FTF-Serving-CNN-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267974962,"owners_count":24174614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["model-deployment","serving","tensorflow-serving"],"created_at":"2024-10-13T14:27:49.321Z","updated_at":"2025-07-31T02:03:08.658Z","avatar_url":"https://github.com/tataganesh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serving a Tensorflow CNN model for Hand Detection using [Tensorflow Serving](https://www.tensorflow.org/tfx/guide/serving)\n\n\n## DataHack Summit 2019 Slides\nI conducted a hack session at DataHack Summit 2019 on [Model Deployment using Tensorflow Serving](https://www.analyticsvidhya.com/datahack-summit-2019/schedule/hack-session-all-you-need-to-know-about-deploying-dl-models-using-tensorflow/). Here are the slides - [Talk slides](https://docs.google.com/presentation/d/1-NKPK4XU8BXYBbre_GYseep4RAwPl0ebzscIgOb00bw/edit?usp=sharing)\n\n\n## Model Training\n\nI referred to the following work for training the hand detector model - \n\nVictor Dibia, HandTrack: A Library For Prototyping Real-time Hand TrackingInterfaces using Convolutional Neural Networks, https://github.com/victordibia/handtracking \n\n## File and folder Descriptions\n\n* [ball_with_hand.py](ball_with_hand.py) - Driver code to run the hand detection model on video frames\n* [hand_detection_client.py](hand_detection_client.py) - Classes that enable interation with the model using gRPC or REST\n* [serving_config.py](tf_serving/serving_config.py) - Port and host configuration to interact with the served model\n* [inference_graph](inference_graph) - Saved model for Hand Detection\n\n## Dependencies\n\n* [python dependencies](requirements.txt)\n* [Install Tensorflow Serving using Docker](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/docker.md)\n\n## Example\n\n* Download the [sample video](https://drive.google.com/file/d/1W9Mi51EICjUCk0HPDrV2qnV6CMMc62Ra/view?usp=sharing)\n* Serve the hand detector\n\n    ```bash\n    docker run -p 8501:8500 -p 9000:8501  \\\n        --mount type=bind,source=/home/tata/Projects/cnn-hand-detector/inference_graph/,target=/models/inference_graph  \\ \n        --mount type=bind,source=/home/tata/Projects/cnn-hand-detector/inference_graph/model_config.config,target=/models/model_config.config \\  \n        -t -i tensorflow/serving --model_config_file=/models/model_config.config --model_config_file_poll_wait_seconds=10 \\  --enable_model_warmup=true\n    ```\n    Demo of running the command (using Asciinema)\n    \n    \u003ca href=\"https://asciinema.org/a/L86BFXVcRqCngY6Y60UPI2I12\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/L86BFXVcRqCngY6Y60UPI2I12.svg\" height=\"300\" width=\"300\"/\u003e\u003c/a\u003e\n    \n    The server can now accept gRPC requests through port 8501 and REST requests through port 9000.\n* Run [ball_with_hand.py](ball_with_hand.py) using either `gRPC` or `REST`\n\n    ``` python3 ball_with_hand.py --method=grpc --video_path=/home/tata/hand_video.mp4 ```\n\n    Demo Video - \n\n  [![Tensorflow Serving Demo](https://img.youtube.com/vi/yJwxuasLETQ/0.jpg)](https://www.youtube.com/watch?v=yJwxuasLETQ)\n\n## More details will be added soon to this README. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftataganesh%2Ftf-serving-cnn-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftataganesh%2Ftf-serving-cnn-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftataganesh%2Ftf-serving-cnn-example/lists"}