STREAMLIT(Part-1):BUILDING A SIMPLE STREAMLIT APPLICATION FOR COMPUTER VISION
Goal: build a simple streamlit application to detect complexion and gender of a person based on facial recognition. It will work by uploading a picture and also live detection with webcam. We will use the pretrained gender model and the trained complexion model.
LINK TO COMPUTER-VISION PART-1(Explains the complexion model training and AutoML): https://juniorboyboy2.medium.com/computer-vision-part-1-build-a-person-profiler-application-based-on-gender-and-complexion-using-738f1b631c82
LINK TO COMPUTER-VISION PART-2(explains pretrained models used for the gender model): https://juniorboyboy2.medium.com/computer-vision-part-2-build-a-person-profiler-application-based-on-gender-and-complexion-learn-c01014d8ccbe
OUTLINE:
- What is Streamlit
- Streamlit built-in or magic functions
- Accessing the trained models via streamlit
- launch streamlit app.
1.What is Streamlit
Streamlit is an open-source Python library that makes it easy to create and share beautiful, custom web apps for machine learning and data science. In just a few minutes you can build and deploy powerful data apps — so let’s get started!. To install ; run “pip install streamlit”.
2. Streamlit built-in or magic functions
Magic commands are a feature in Streamlit that allows you to write markdown and data to your app with very few keypresses.
for example
2.1 streamlit.write
2.2 streamlit.text
(body)
2.3 st.markdown(‘Streamlit is **_really_ cool**.’)
2.4 streamlit.caption
(‘This is a string that explains something above’)
2.5 st.title(‘This is a title’)
2.6 streamlit.subheader
(“This is a title”)
2.7 st.table(df)
and many more. visit https://docs.streamlit.io/en/stable/api.html for more
3. Accessing the trained models via streamlit
To view complete and explanatory code: https://github.com/juniorboycoder/Person_profiler_source_code/blob/main/app.py
4. launch streamlit app.
CONCLUSION
We built a simple streamlit application to detect complexion and gender of a person both by webcam and picture upload.
WRITER: OLUYEDE SEGUN . A(jr)
Resources used (References) and further reading:
Link to my github code:
linkedin profile: https://www.linkedin.com/in/oluyede-segun-adedeji-jr-a5550b167/
twitter profile: https://twitter.com/oluyedejun1
TAGS: #COMPUTERVISION #OPENCV #PYTHON #STREAMLIT #DEEPLEARNING