Add shape classification using Zernike Moments + Streamlit demo#14
Open
Mandar808 wants to merge 4 commits into
Open
Add shape classification using Zernike Moments + Streamlit demo#14Mandar808 wants to merge 4 commits into
Mandar808 wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔄 Pull Request: Shape Classification using Zernike Moments with NLP Extension
This PR introduces a comprehensive example for shape classification using Zernike Moments on a custom image dataset (circles, squares, triangles), with an additional NLP-based interaction mode.
✅ Key Contributions:
🧠 Core Features:
examples/shape_classifier.py→ Trains an SVM classifier using Zernike Moments extracted from shape images.
→ Includes prediction confidence metrics and visualizations.
shape_app.py→ A Streamlit web app that allows users to classify shapes by uploading an image.
→ Enhanced to accept natural language text input and classify shapes based on textual descriptions (e.g., "three sides", "perfectly round").
text_to_shape_classifier.joblib→ An NLP-based classifier trained to map textual shape descriptions to shape labels, enabling a novel text-to-shape prediction capability.
Visual Confidence Tools
→ Added
confidence_plot.pngandconfidence_histogram.pngto visualize prediction certainty per sample and per class.datasets/shapes/→ Sample dataset of binary shape images used for training.
Trained Models
→
zernike_shape_svm_model.joblibfor image-based classification→
label_encoder.joblibfor label decoding→
text_to_shape_classifier.joblibfor NLP-driven shape understanding🧠 🔤 NLP Integration:
This project now bridges vision and language by allowing users to describe a shape using plain English, which is classified using an NLP pipeline.
This represents a unique cross-domain enhancement—using natural language understanding (NLU) to trigger shape classification in a computer vision pipeline.
📚 README:
Instructions updated with:
🚀 Summary:
This PR enhances the
pyfeatslibrary by: