{"id":29022921,"url":"https://github.com/sayanjit082805/natural-scene-classifier","last_synced_at":"2026-04-18T19:31:58.902Z","repository":{"id":300358367,"uuid":"1005948797","full_name":"sayanjit082805/Natural-Scene-Classifier","owner":"sayanjit082805","description":"Image classifier for classifying natural scenes/images using a CNN","archived":false,"fork":false,"pushed_at":"2025-06-21T08:18:43.000Z","size":75821,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-21T08:31:00.312Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sayanjit082805.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,"zenodo":null}},"created_at":"2025-06-21T06:34:44.000Z","updated_at":"2025-06-21T08:19:33.000Z","dependencies_parsed_at":"2025-06-21T08:43:08.885Z","dependency_job_id":null,"html_url":"https://github.com/sayanjit082805/Natural-Scene-Classifier","commit_stats":null,"previous_names":["sayanjit082805/natural-scene-classifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sayanjit082805/Natural-Scene-Classifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayanjit082805%2FNatural-Scene-Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayanjit082805%2FNatural-Scene-Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayanjit082805%2FNatural-Scene-Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayanjit082805%2FNatural-Scene-Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayanjit082805","download_url":"https://codeload.github.com/sayanjit082805/Natural-Scene-Classifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayanjit082805%2FNatural-Scene-Classifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990352,"owners_count":23241188,"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":["convolutional-neural-networks","deep-learning","tensorflow"],"created_at":"2025-06-26T03:04:15.673Z","updated_at":"2025-10-17T22:37:11.786Z","avatar_url":"https://github.com/sayanjit082805.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Natural-Scene Classifier\nA deep learning image classifier built with Convolutional Neural Networks (CNN) to identify and classify natural scenes from the Intel Image Classification dataset.\n\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n![Jupyter Notebook](https://img.shields.io/badge/jupyter-%23FA0F00.svg?style=for-the-badge\u0026logo=jupyter\u0026logoColor=white)\n![TensorFlow](https://img.shields.io/badge/TensorFlow-%23FF6F00.svg?style=for-the-badge\u0026logo=TensorFlow\u0026logoColor=white)\n\n\n# Overview \nThis project aims to classify natural scenes/images into six categories :\n\n- **Buildings** \n- **Forests** \n- **Glaciers**\n- **Mountains**\n- **Seas**\n- **Streets**\n\n# Dataset\nThe dataset has been taken from [Kaggle](https://www.kaggle.com/datasets/puneet6060/intel-image-classification). It contains around 25,000 images of natural scenes from around the world.\n\n**Dataset Statistics** :\n\n- **Total Images**: ~25,000\n- **Training Set**: ~14,000 images\n- **Test Set**: ~3,000 images\n- **Validation Set**: ~7,000 images\n- **Classes**: 6 (Buildings, Forest, Glacier, Mountain, Sea, Street)\n\n\n# Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/sayanjit082805/Natural-Scene-Classifier.git\ncd Natural-Scene-Classifier\n```\n\n2. Create a virtual environment (recommended):\n\n```bash\npython -m venv nature_classification_env\nsource nature_classification_env/bin/activate  # On Windows: nature_classification_env\\Scripts\\activate\n```\n\n3. Install required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n\n4. Download the dataset\n   - Download from [Kaggle](https://www.kaggle.com/datasets/puneet6060/intel-image-classification)\n   - Extract to `data/` directory\n   - Ensure folder structure matches:\n   ```\n   data/\n   ├── seg_train/\n   │   ├── buildings/\n   │   ├── forest/\n   │   ├── glacier/\n   │   ├── mountain/\n   │   ├── sea/\n   │   └── street/\n   ├── seg_test/\n   └── seg_pred/\n   ```\n\n\nFor local testing, update the `train_data_path` and `test_data_path` in the notebook. Also, make sure to not run the first cell. \n\nI do not recommend installing locally, instead, you can just check out the [Kaggle notebook](https://www.kaggle.com/code/sayanjit082805/notebookef76f9189d).\n\nAlternatively, you can just visit the site.\n\n# Neural Network Architecture\nThe CNN consists of :\n\n- **Input Layer** : 256x256x3 RGB images.\n- **Rescaling Layer** : Rescales the input to be in the [0, 1] range. \n- **Four Convolution Layers** : \n\t-  First CONV2D layer with 32 filters and a filter size of 3x3, followed by BatchNormalization and MaxPooling.\n\t- Second CONV2D layer with 64 filters and a filter size of 3x3, followed by BatchNormalization and MaxPooling.\n\t- Third CONV2D layer with 128 filters and a filter size of 3x3, followed by BatchNormalization and MaxPooling.\n\t- Fourth CONV2D layer with 256 filters and a filer size of 3x3, followed by BatchNormalization and MaxPooling.\n- **Flattening Layer** - Flattens the output of the last convolution layer into a 1D array.\n- **Dense Layer** - Consists of 128 neurons and the activation function used is the RelU activation function.\n- **Output Layer** : 6 neurons, with softmax activation function for multi-class classification.\n\nThe optimiser used is the [Adam](https://keras.io/api/optimizers/adam/) optimiser, and the loss function is the sparse categorical cross-entropy. \n\n# Metrics\nThe model achieves an overall accuracy of ~83%. For more detailed metrics, please consult the classification report in the jupyter notebook.  \n\nDue to the use of Early fitting, the model convergences at 66 epochs.\n\n# License \nThis project is licensed under The Unlicense License, see the LICENSE file for details. \n\n\u003e[!NOTE]\n\u003e The License does not cover the dataset. It has been taken from Kaggle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayanjit082805%2Fnatural-scene-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayanjit082805%2Fnatural-scene-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayanjit082805%2Fnatural-scene-classifier/lists"}