{"id":25052354,"url":"https://github.com/haturusinghe/cnn-age-gender","last_synced_at":"2026-04-27T12:01:34.385Z","repository":{"id":141369228,"uuid":"409403262","full_name":"haturusinghe/cnn-age-gender","owner":"haturusinghe","description":"This repository contains implementations of convolutional neural networks (CNNs) for age and gender classification using facial images from the UTKFace dataset.","archived":false,"fork":false,"pushed_at":"2025-01-09T03:47:38.000Z","size":6672,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T06:16:31.705Z","etag":null,"topics":["age-detection","convolutional-neural-networks","gender-detection","tensorflow"],"latest_commit_sha":null,"homepage":"","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/haturusinghe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-23T01:05:39.000Z","updated_at":"2025-01-09T03:48:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"951db54a-4a53-4780-a214-3b254bc93871","html_url":"https://github.com/haturusinghe/cnn-age-gender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haturusinghe/cnn-age-gender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haturusinghe%2Fcnn-age-gender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haturusinghe%2Fcnn-age-gender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haturusinghe%2Fcnn-age-gender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haturusinghe%2Fcnn-age-gender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haturusinghe","download_url":"https://codeload.github.com/haturusinghe/cnn-age-gender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haturusinghe%2Fcnn-age-gender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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-detection","convolutional-neural-networks","gender-detection","tensorflow"],"created_at":"2025-02-06T10:29:19.101Z","updated_at":"2026-04-27T12:01:34.366Z","avatar_url":"https://github.com/haturusinghe.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Age and Gender Classification using CNNs\n\nThis repository contains implementations of convolutional neural networks (CNNs) for age and gender classification using facial images from the UTKFace dataset.\n\n## Models\n\n### Age Classification Model\n- Uses a CNN architecture with separable convolutions\n- Predicts age as a continuous value using regression\n- Features:\n  - Input image size: 200x200x3\n  - 6 convolutional blocks with batch normalization and LeakyReLU\n  - Dense layers with dropout for regularization \n  - Outputs lower and upper age bounds\n  - Mean Absolute Error loss function\n\n### Gender Classification Model\n- CNN for binary classification of gender (male/female)\n- Architecture:\n  - Input image size: 200x200x3\n  - 5 convolutional blocks with batch normalization\n  - Dense layers with dropout\n  - Softmax output layer\n  - Categorical crossentropy loss\n\n## Dataset\n- Uses the [UTKFace dataset](https://susanqq.github.io/UTKFace/)\n- Images are preprocessed to 200x200 pixels\n- Training/validation split: 70%/30%\n- Data augmentation with random flips and rotations\n\n## Training\n- Models trained using Adam optimizer\n- Early stopping and model checkpointing\n- TensorBoard logging for monitoring training\n- Learning rate scheduling\n\n## Results\nThe models achieve:\n- Age prediction: MAE of ~5.5 years\n- Gender classification: ~90% accuracy\n\n## Requirements\n- TensorFlow 2.x\n- NumPy\n- Matplotlib\n- scikit-learn\n\n## Usage\nThe Jupyter notebooks contain the complete implementation:\n- `age_class_model.ipynb`: Age regression model\n- `gender_class_model(UTK_Crop).ipynb`: Gender classification model\n\nModels can be exported to TFLite format for mobile/edge deployment.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaturusinghe%2Fcnn-age-gender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaturusinghe%2Fcnn-age-gender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaturusinghe%2Fcnn-age-gender/lists"}