{"id":24066212,"url":"https://github.com/hendhamdi/deep_learning-cnn-master.github.io","last_synced_at":"2025-09-10T07:37:05.207Z","repository":{"id":213305666,"uuid":"733505926","full_name":"hendhamdi/deep_learning-cnn-master.github.io","owner":"hendhamdi","description":"Image Classification with a Convolutional Neural Network (CNN)","archived":false,"fork":false,"pushed_at":"2024-12-14T13:12:14.000Z","size":87852,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-09T11:20:01.478Z","etag":null,"topics":["classification-algorithm","cnn","deep-learning","python","testing","training"],"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/hendhamdi.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":"2023-12-19T13:33:39.000Z","updated_at":"2025-01-02T11:34:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"b151641e-6805-47e0-9236-dea83ba3fa26","html_url":"https://github.com/hendhamdi/deep_learning-cnn-master.github.io","commit_stats":null,"previous_names":["hendhamdi/deep_learning-cnn-master","hendhamdi/deep_learning-cnn-master.github.io"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendhamdi%2Fdeep_learning-cnn-master.github.io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendhamdi%2Fdeep_learning-cnn-master.github.io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendhamdi%2Fdeep_learning-cnn-master.github.io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendhamdi%2Fdeep_learning-cnn-master.github.io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hendhamdi","download_url":"https://codeload.github.com/hendhamdi/deep_learning-cnn-master.github.io/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240914710,"owners_count":19878029,"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":["classification-algorithm","cnn","deep-learning","python","testing","training"],"created_at":"2025-01-09T11:20:13.267Z","updated_at":"2025-02-26T18:43:45.714Z","avatar_url":"https://github.com/hendhamdi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Classification with a Convolutional Neural Network (CNN)\n\n## Description\nThis project uses PyTorch to create, train, and evaluate a convolutional neural network (CNN) for image classification. The dataset is split into training (80%) and testing (20%) sets, and metrics such as loss and accuracy are tracked to analyze the model's performance.\n\n## Features\n **Data Splitting** : Splitting the dataset into training (80%) and testing (20%) sets using  `split.py` script.\n- **CNN Model** : Construction of a network with convolutional layers, normalization, activation (ReLU), pooling, and a fully connected layer for classification.\n- **Advanced Optimization** : Implementation of the SGD (Stochastic Gradient Descent) algorithm with hyperparameter tuning such as learning rate and momentum.\n- **Performance Analysis** : Tracking metrics across epochs, including loss and accuracy.\n- **Visualization** : Generation of a graph illustrating loss and accuracy over epochs, saved as a PDF.\n\n## Dataset\nThe dataset contains the following classes:\n- Annual Crop\n- Forest\n- River\n- Sea Lake\n- Highway\n- Industrial\n- Pasture\n- Permanent Crop\n- Residential\n- Herbaceous Vegetation\n\n## Dependencies\nEnsure the following libraries are installed:\n- Python 3.x\n- PyTorch\n- Matplotlib\n- Scikit-learn\n- MySQL (if additional storage is needed)\n\n## Usage\n### Data Splitting\nThe `split.py` script in the  `other` directory splits the dataset into training and testing sets:\n    ```python\n    from sklearn.model_selection import train_test_split\n    \nAn example of usage is included in the script.\n\n### Model Training\n. Training Phase : Adjusting weights through backpropagation.\n\n.Testing Phase : Evaluating the model's ability to generalize.\n\n## Results\n.Final Accuracy : 85% (training), 81% (testing).\n\n.Observed Trends : Progressive decrease in loss, consistent increase in accuracy.\n\n## Visualization\nA graph illustrating loss and accuracy across epochs is generated and saved as a PDF.\n\n![image](https://github.com/user-attachments/assets/fc3eea4d-0a4c-419a-98e6-85de635e511e)\n![image](https://github.com/user-attachments/assets/202f89dd-5432-4479-bf0b-e5b6c99158a6)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendhamdi%2Fdeep_learning-cnn-master.github.io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhendhamdi%2Fdeep_learning-cnn-master.github.io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendhamdi%2Fdeep_learning-cnn-master.github.io/lists"}