{"id":21427879,"url":"https://github.com/not-ml/ml-3","last_synced_at":"2026-05-08T08:33:42.022Z","repository":{"id":264169026,"uuid":"892572820","full_name":"Not-ML/ML-3","owner":"Not-ML","description":"A PyTorch-based Convolutional Neural Network (CNN) for image classification using the CIFAR-10 dataset, featuring advanced architecture, data augmentation, GPU support, and dynamic learning rate scheduling.","archived":false,"fork":false,"pushed_at":"2024-11-22T11:38:38.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T07:47:43.350Z","etag":null,"topics":["ai","cifar10","cnn","cuda","gpu","image-classification","machine-learning","modeltraining","python","pytorch","torchvision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Not-ML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-22T11:19:04.000Z","updated_at":"2024-11-22T11:34:35.000Z","dependencies_parsed_at":"2024-11-22T12:25:20.498Z","dependency_job_id":"5347500b-0bf3-454a-baa1-b8dcabddcaa9","html_url":"https://github.com/Not-ML/ML-3","commit_stats":null,"previous_names":["not-ml/ml-3"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Not-ML%2FML-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Not-ML%2FML-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Not-ML%2FML-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Not-ML%2FML-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Not-ML","download_url":"https://codeload.github.com/Not-ML/ML-3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933788,"owners_count":20371062,"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":["ai","cifar10","cnn","cuda","gpu","image-classification","machine-learning","modeltraining","python","pytorch","torchvision"],"created_at":"2024-11-22T22:08:09.320Z","updated_at":"2026-05-08T08:33:41.974Z","avatar_url":"https://github.com/Not-ML.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![pytorch-logo-dark](https://github.com/user-attachments/assets/3eb23528-872c-45c8-925a-ed656e757278)\n\n\n# Advanced CNN for CIFAR-10 Classification\n\n\nThis project implements an advanced Convolutional Neural Network (CNN) in PyTorch to classify images from the CIFAR-10 dataset into 10 categories: `airplane`, `automobile`, `bird`, `cat`, `deer`, `dog`, `frog`, `horse`, `ship`, and `truck`.\n\n## Features\n- **Pretrained Dataset**: Utilizes CIFAR-10, a 60,000-image dataset split into 50,000 training and 10,000 test images.\n- **Customizable CNN Model**: Includes multiple convolutional, batch normalization, pooling, and fully connected layers for accurate classification.\n- **GPU Support**: Automatically utilizes CUDA if available for faster computation.\n- **Data Augmentation**: Enhances training with random cropping, flipping, and normalization.\n- **Training Scheduler**: Reduces learning rate dynamically for fine-tuning.\n\n## Setup and Requirements\n### Prerequisites\n- Python 3.x\n- Required packages: `torch`, `torchvision`, `tqdm`, `Pillow`\n\nInstall dependencies with:\n```bash\npip install torch torchvision tqdm Pillow\n```\n\n### Clone the Repository\n```bash\ngit clone https://github.com/your-username/advanced-cnn-cifar10.git\ncd advanced-cnn-cifar10\n```\n\n## Training the Model\nRun the script to train the model:\n```bash\npython advanced_cnn_cifar10.py\n```\n- Adjust `num_epochs`, `batch_size`, or `learning_rate` in the script for your requirements.\n- Trained models are saved in the `checkpoints/` directory.\n\n## Inference\n### Predict Single Image\n```python\nfrom predict import predict_image\n\nmodel_path = 'checkpoints/advanced_cnn.pth'\nimage_path = 'path/to/your/image.jpg'\n\nprediction = predict_image(image_path, model_path)\nprint(f'Predicted class: {prediction}')\n```\n\n### Predict Batch of Images\n```python\nfrom predict import predict_batch\n\nbatch_predictions = predict_batch('path/to/dataset', model_path)\nprint(batch_predictions)\n```\n\n## Results\n- Achieves 85-90% accuracy on the CIFAR-10 test set after 30 epochs.\n- Checkpoint and accuracy logs are generated during training.\n\n## Additional Notes\n- Modify the architecture or hyperparameters to experiment with different configurations.\n- GPU is highly recommended for faster training.\n\nFor more details, check the code files: `advanced_cnn_cifar10.py` (training) and `predict.py` (inference).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnot-ml%2Fml-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnot-ml%2Fml-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnot-ml%2Fml-3/lists"}