{"id":22202445,"url":"https://github.com/stephnna/my_image_classifier","last_synced_at":"2026-05-11T05:51:13.155Z","repository":{"id":265421450,"uuid":"895952620","full_name":"stephnna/my_image_classifier","owner":"stephnna","description":"A deep learning-based image classifier built with PyTorch, designed to identify various flower species using architectures like VGG16, ResNet101, and AlexNet. This project leverages transfer learning for improved performance, checkpointing for seamless training, and supports both CPU and GPU devices. Perfect for exploring deep learning models and i","archived":false,"fork":false,"pushed_at":"2024-12-08T14:08:00.000Z","size":543,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T09:30:16.652Z","etag":null,"topics":["matplotlib","numpy","python","pytorch"],"latest_commit_sha":null,"homepage":"","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/stephnna.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":"2024-11-29T08:52:27.000Z","updated_at":"2024-12-08T14:08:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"542cf123-22d7-4e44-8762-fb68bcdddc69","html_url":"https://github.com/stephnna/my_image_classifier","commit_stats":null,"previous_names":["stephnna/my_image_classifier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephnna%2Fmy_image_classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephnna%2Fmy_image_classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephnna%2Fmy_image_classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephnna%2Fmy_image_classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephnna","download_url":"https://codeload.github.com/stephnna/my_image_classifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999320,"owners_count":20707554,"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","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":["matplotlib","numpy","python","pytorch"],"created_at":"2024-12-02T16:21:08.936Z","updated_at":"2026-05-11T05:51:08.128Z","avatar_url":"https://github.com/stephnna.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌸 Flower Species Image Classifier\n\nThis project is a Deep Learning Image Classifier built using PyTorch to identify different flower species. It supports architectures like VGG16, ResNet101, and AlexNet, allowing for accurate flower species predictions.\n\n## 🚀 Features\n- ✨ **Multiple Architectures**: VGG16, ResNet101, AlexNet, and custom models.\n- ✨ **Transfer Learning**: Leverages pre-trained models for better performance.\n- ✨ **Checkpointing**: Save and resume training seamlessly.\n- ✨ **Device Compatibility**: Works on both CPU and GPU.\n- ✨ **Top-K Predictions**: Get probabilities for the top-K most likely classes.\n- ✨ **Customizable Training**: Configurable hyperparameters for flexibility.\n\n## 🛠️ Installation\n### Clone the repository:\n```bash\ngit clone https://github.com/your-username/my_image_classifier.git\ncd my_image_classifier\n\nInstall dependencies:\npip install -r requirements.txt\n\nInstall PyTorch (if not already installed):\nFollow PyTorch installation instructions here.\n\n🏋️‍♀️ Training the Model\nPrepare your dataset:\nOrganize your data directory like this:\n\ndata/\n├── train/\n├── valid/\n└── test/\n\nRun the training script:\n\npython train.py \u003cdata_dir\u003e \u003carch\u003e \u003chidden_units\u003e \u003cbatch_size\u003e --gpu --epochs \u003cepochs\u003e --learning_rate \u003clr\u003e\n\n\nExample: python train.py flowers vgg16 512 64 --gpu --epochs 10 --learning_rate 0.001\n\nSave checkpoints:\nCheckpoints will be saved in the checkpoints/ directory automatically.\n\n🔍 Prediction\nRun the prediction script:\n\npython predict.py \u003cimage_path\u003e \u003ccheckpoint_path\u003e --top_k \u003cK\u003e --category_names \u003cjson_path\u003e --gpu\n\n\nOutput:\nTop Predictions:\n\nSunflower (87%)\nDaisy (5%)\nRose (3%)\n📂 Project Structure\n\n\nFile/Folder\tDescription\ntrain.py\tScript for training the classifier.\npredict.py\tScript for making predictions on new images.\nutils.py\tHelper functions for data loading, checkpointing, and preprocessing.\ndata/\tDataset directory.\ncheckpoints/\tDirectory for saved model checkpoints.\nlosses/\tLogs for tracking training/validation losses and accuracy.\n\n📊 Metrics Tracking\nTraining Loss: Measures the model's error during training.\nValidation Accuracy: Evaluates the model's performance on unseen data.\nSaved Logs: Automatically stored in the losses/ directory.\n📝 Example Workflow\n\nTrain the model:\npython train.py flowers vgg16 512 64 --gpu --epochs 10\n\nSave the checkpoint:\nThe checkpoint is saved as checkpoints/vgg16_checkpoint.pth.\n\nPredict a flower class:\n\npython predict.py flowers/test/1/image_06752.jpg checkpoints/vgg16_checkpoint.pth --top_k 3 --gpu\n\n\n💡 Future Enhancements\nAdd support for additional architectures.\nImplement a GUI or web interface for easier predictions.\nOptimize performance for larger datasets.\n🤝 Contributing\nContributions are welcome! Follow these steps to contribute:\n\nFork the repository.\n\ngit checkout -b feature-name\n\nCommit your changes\ngit commit -m \"Add new feature\"\n\nPush to your branch:\ngit push origin feature-name\n\n🧑‍💻 Author\nStephen Ezea\nGitHub: github.com/stephnna/\nLinkedIn: https://www.linkedin.com/in/stephen-ezea\n\n🌟 Acknowledgments\nSpecial thanks to:\n\nThe PyTorch community for their amazing library.\nAmazon for datasets and inspiration.\n🏵️ Happy Coding \u0026 Flower Classifying! 🏵️\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephnna%2Fmy_image_classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephnna%2Fmy_image_classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephnna%2Fmy_image_classifier/lists"}