Deep Learning Simplified is an Open-source repository, containing beginner to advance level deep learning projects for the contributors, who are willing to start their journey in Deep Learning. Devfolio URL, https://devfolio.co/projects/deep-learning-simplified-f013
Issue Title : [Feature Addition]: Web Application for Age and Sex Prediction #538
Info about the related issue : The aim is to create a web application with the best accuracy scored existing model present /developed in the Model folder of the project.
Started with downloading the model trained in .h5 format using CNN model which was already trained here. No changes are made in this training model code.
Creating a web interface using Flask.
For prediction, the images uploaded by the users were pre-processed in the same manner that was executed while training the model which required RGB image to grayscale conversion, resizing the image, and normalizing it.
Since the dataset contained only facial images, so a new function is added that will extract the face from uploaded image by the user. For this, haar cascade is used designed by OpenCV to detect frontal face.
Then the image becomes ready for prediction.
Type of change ☑️
What sort of change have I made:
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested? ⚙️
Initially, I successfully ran the Flask application without any errors, verifying its smooth operation on the local server. I then tested user interactions, ensuring that users can't proceed without uploading an image and that any issues with image uploads redirected them to an error page. This error page is designed which will indicate the user that "Something went wrong" and provided an option to return to the home page. To further validate the feature, I used images from open-source platforms like Pixabay, ensuring that the application can work with these images also. The face detection functionality, utilizing Haar Cascade, was verified to crop faces accurately in the these images.
Checklist: ☑️
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly wherever it was hard to understand.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have added things that prove my fix is effective or that my feature works.
[x] Any dependent changes have been merged and published in downstream modules.
Pull Request for DL-Simplified 💡
Issue Title : [Feature Addition]: Web Application for Age and Sex Prediction #538
GSSOC'24
Closes: #538
Describe the add-ons or changes you've made 📃
Type of change ☑️
What sort of change have I made:
How Has This Been Tested? ⚙️
Initially, I successfully ran the Flask application without any errors, verifying its smooth operation on the local server. I then tested user interactions, ensuring that users can't proceed without uploading an image and that any issues with image uploads redirected them to an error page. This error page is designed which will indicate the user that "Something went wrong" and provided an option to return to the home page. To further validate the feature, I used images from open-source platforms like Pixabay, ensuring that the application can work with these images also. The face detection functionality, utilizing Haar Cascade, was verified to crop faces accurately in the these images.
Checklist: ☑️
Thanks!