{"id":24570385,"url":"https://github.com/borhanmorphy/smile","last_synced_at":"2025-10-19T03:25:39.598Z","repository":{"id":46438539,"uuid":"237656772","full_name":"borhanMorphy/Smile","owner":"borhanMorphy","description":"Face detection with smiling/neutral classification using opencv haar cascade and LeNet5 ","archived":false,"fork":false,"pushed_at":"2021-10-12T23:02:04.000Z","size":8,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T06:49:28.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/borhanMorphy.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":"2020-02-01T18:13:18.000Z","updated_at":"2020-02-01T18:50:03.000Z","dependencies_parsed_at":"2022-09-23T07:23:20.627Z","dependency_job_id":null,"html_url":"https://github.com/borhanMorphy/Smile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/borhanMorphy/Smile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2FSmile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2FSmile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2FSmile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2FSmile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borhanMorphy","download_url":"https://codeload.github.com/borhanMorphy/Smile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2FSmile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270899582,"owners_count":24664720,"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-08-17T02:00:09.016Z","response_time":129,"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":[],"created_at":"2025-01-23T16:19:31.673Z","updated_at":"2025-10-19T03:25:34.529Z","avatar_url":"https://github.com/borhanMorphy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Brief Explanation\nReal time (CPU) face detection using opencv haar cascade and a CNN classifier to classify faces that smiles or not.\u003cbr/\u003e\nFor classification LeNet5 used and impelented with pytorch\u003cbr/\u003e\n\n## Dataset\nYou can obtain the dataset [here](https://github.com/hromi/SMILEsmileD/tree/master/SMILEs)\n\n## Traning\n\nIf you have a gpu than you can use like this to train the classifier\n```\npython3 train.py --batch_size 64 --epochs 15 --model_name lenet -g 0\n```\n\nTo train on CPU\n```\npython3 train.py --batch_size 64 --epochs 15 --model_name lenet -g -1\n```\n\nThere will be 2 model on the models/ directory\u003cbr/\u003e\nbest.pt refers that model saved when best eval result on test set achived.\u003cbr/\u003e\nlast.pt refers that model saved when last epoch runned.\u003cbr/\u003e\n\n## Inference\n\nTo run the detector and classifier use inference.py\n```\npython3 inference.py\n```\n\nThis will cause to open webcam at index 0 and run the classifier with detector using best.pt\n\n## References\n[LeNet5](http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf)\u003cbr/\u003e\n[Dataset](https://github.com/hromi/SMILEsmileD/tree/master/SMILEs)\u003cbr/\u003e\n[Special thanks to Adrian Rosebrock and his awesome book](https://www.pyimagesearch.com/deep-learning-computer-vision-python-book/)\u003cbr/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborhanmorphy%2Fsmile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborhanmorphy%2Fsmile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborhanmorphy%2Fsmile/lists"}