{"id":17006632,"url":"https://github.com/wrannaman/tensorflow-age-gender","last_synced_at":"2026-05-02T06:41:25.402Z","repository":{"id":39736441,"uuid":"200881435","full_name":"wrannaman/tensorflow-age-gender","owner":"wrannaman","description":"Age and Gender in tensorflow on a cpu or gpu!","archived":false,"fork":false,"pushed_at":"2023-02-02T05:17:22.000Z","size":444,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T19:19:57.729Z","etag":null,"topics":["age","ai","back-end","computer-vision","cpu","machine-learning","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/wrannaman.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-06T15:48:05.000Z","updated_at":"2020-07-28T04:32:58.000Z","dependencies_parsed_at":"2023-01-22T17:00:43.306Z","dependency_job_id":null,"html_url":"https://github.com/wrannaman/tensorflow-age-gender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wrannaman/tensorflow-age-gender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrannaman%2Ftensorflow-age-gender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrannaman%2Ftensorflow-age-gender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrannaman%2Ftensorflow-age-gender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrannaman%2Ftensorflow-age-gender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wrannaman","download_url":"https://codeload.github.com/wrannaman/tensorflow-age-gender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrannaman%2Ftensorflow-age-gender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32525896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["age","ai","back-end","computer-vision","cpu","machine-learning","tensorflow"],"created_at":"2024-10-14T05:06:27.925Z","updated_at":"2026-05-02T06:41:25.386Z","avatar_url":"https://github.com/wrannaman.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Age Gender Estimation (Tensorflow)\n\n*Tensorflow based Age Gender Model (CPU + GPU)*\n\n## Speed\n| Hardware \t| Inference Time (Milliseconds)\n|----------\t|-------------------------------\n| CPU      \t| 750 (intel i-7)\n| GPU      \t| 430 (NVIDIA 2080)\n\nThis model's inference time increases sublinearly with the number of people.\n\n## Accuracy\n| Detection       | Accuracy\n|---------------\t|-------------------------------\n| Face - Accurate | ~95% (frontal faces) (accurate model)\n| Face - Fast     | ~90% (frontal faces) (accurate model)\n| Age      \t      | +- 5 years\n\nThere are two detectors built into this container. You can toggle between them in the post parameters\n\n## Face Detector\n\n| Model     | Description\n|----------\t|-------------------------------\n| Fast      | dlib\n| Accurate  | tensorflow based cnn face detector\n\n- The size of the face is 64x64\n- For the GPU version, this model needs a minimum of 200MB.\n\n## Run\n```sh\n\n#cpu\ndocker run -ti \\\\\n-p 9090:9090 \\\\\nsugarkubes/tensorflow-age-gender:cpu\n\n#gpu\nnvidia-docker run -ti \\\\\n-p 9090:9090 \\\\\nsugarkubes/tensorflow-age-gender:gpu\n```\n\n\n## Routes\n\n`GET /`\n`GET /health`\n`GET /healthz`\n- Responds with a 200 for healthcheck\n\n`POST /predict`\n- Example:\n```sh\ncurl -X POST \\\\\nhttp://0.0.0.0:9090/predict \\\\\n-H 'Content-Type: application/json' \\\\\n-d '{ \"url\": \"https://s3.us-west-1.wasabisys.com/public.sugarkubes/repos/sugar-cv/object-detection/friends.jpg\" }'\n```\n\n- Post parameters\n```json\n{\n  \"face_detector\": \"fast\", # One of [\"accurate\", \"fast\"]\n  \"return_image\": true, # use false for production/faster results\n  \"url\": 'https://your-image.jpg', # use url or b64 image\n  \"b64\": \"\", # base 64 encoded image\n}\n```\n\n\n## ENV Variables\n\n| Variable \t   | Default\n|------------  |-------------------------------\n| PORT         | 8080\n| HOST         | 0.0.0.0\n| GPU          | \"\" (true for GPU version)\n| GPU_FRACTION | 0.25 (25% of the gpu will be allocated to this model)\n| BASIC_AUTH_USERNAME | \"\"\n| BASIC_AUTH_PASSWORD | \"\"\n\n## Google Cloud Run Enabled\n\n- This container can immediately be deployed using Google's new Cloud Run serverless service (cpu inference only)\n- Its a cheap and quick way to get the model online\n\n## Response\n\n```json\n{\n  //         x1   y1   x2   y2   w    h  conf age gender\n  \"faces\": [[451, 0, 914, 452, 463, 514, -1, 37, \"M\"]],\n  \"image_size\": [1920, 1080],\n  \"inference_time\": 431.462,\n}\n```\n\n\n## Authentication\n- The container comes with the ability to support basic auth.\n- basic auth is disabled by default.\n- to turn it off, set `BASIC_AUTH_USERNAME=\"\"` and `BASIC_AUTH_PASSWORD=\"\"`\n- to turn it on, set `BASIC_AUTH_USERNAME=\"root\"` and `BASIC_AUTH_PASSWORD=\"your password\"`\n\n## About the container\n- python 3.5.2 (cpu)\n- python 3.5.1 (gpu)\n- tensorflow 1.13.1\n\n## Validated Hosts\n- intel x86 machines running ubuntu server 18.04 19.04 20.04\n- cuda 10.1\n- cuda 10.2\n- mac\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrannaman%2Ftensorflow-age-gender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwrannaman%2Ftensorflow-age-gender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrannaman%2Ftensorflow-age-gender/lists"}