Skip to main content

PyTorch Lightning Implementations of Recent Satellite Image Classification !

Project description

Satellighte

Satellighte

Satellite Image Classification

WebsiteDocsPypi

Demo PageHugging Face

TABLE OF CONTENTS
  1. About The Satellighte
  2. Prerequisites
  3. Installation
  4. Usage Examples
  5. APIs
  6. Architectures
  7. Datasets
  8. Deployments
  9. Training
  10. Tests
  11. Contributing
  12. Contributors
  13. Contact
  14. License
  15. References
  16. Citations

About The Satellighte

Satellighte is an image classification library that consist state-of-the-art deep learning methods. It is a combination of the words 'Satellite' and 'Light', and its purpose is to establish a light structure to classify satellite images, but to obtain robust results.

Satellite image classification is the most significant technique used in remote sensing for the computerized study and pattern recognition of satellite information, which is based on diversity structures of the image that involve rigorous validation of the training samples depending on the used classification algorithm.

Source: paperswithcode

Prerequisites

Before you begin, ensure you have met the following requirements:

requirement version
imageio ~=2.15.0
numpy ~=1.21.0
pytorch_lightning ~=1.6.0
scikit-learn ~=1.0.2
torch ~=1.8.1

Installation

To install Satellighte, follow these steps:

From Pypi

pip install satellighte

From Source

git clone https://github.com/canturan10/satellighte.git
cd satellighte
pip install .

From Source For Development

git clone https://github.com/canturan10/satellighte.git
cd satellighte
pip install -e ".[all]"

Usage Examples

import imageio
import satellighte as sat

img = imageio.imread("test.jpg")

model = sat.Classifier.from_pretrained("model_config_dataset")
model.eval()

results = model.predict(img)
# [{'cls1': 0.55, 'cls2': 0.45}]

APIs

1- Get Available Models

import satellighte as sat
sat.available_models()
# ['efficientnet_b0_eurosat', 'mobilenetv2_default_eurosat']

2- Get Available Versions for a Spesific Model

import satellighte as sat
model_name = 'efficientnet_b0_eurosat'
sat.get_model_versions(model_name)
# ['0']

3- Get Latest Version for a Spesific Model

import satellighte as sat
model_name = 'efficientnet_b0_eurosat'
sat.get_model_latest_version(model_name)
# '0'

4- Get Pretrained Model

import satellighte as sat
model_name = 'efficientnet_b0_eurosat'
model = sat.Classifier.from_pretrained(model_name, version=None) # if version none is given than latest version will be used.
# model: pl.LightningModule

5- Get Model with Random Weight Initialization

import satellighte as sat
arch = 'efficientnet'
config = 'b0'
model = sat.Classifier.build(arch, config)
# model: pl.LightningModule

6- Get Pretrained Arch Model

import satellighte as sat
model_name = 'efficientnet_b0_eurosat'
model = sat.Classifier.from_pretrained_arch(model_name, version=None) # if version none is given than latest version will be used.
# model: torch.nn.Module

7- Get Arch Model with Random Weight Initialization

import satellighte as sat
arch = 'efficientnet'
config = 'b0'
model = sat.Classifier.build_arch(arch, config)
# model: torch.nn.Module

Architectures

For more information, please refer to the Architectures

Datasets

For more information, please refer to the Datasets

Deployments

For more information, please refer to the Deployment

Training

To training, follow these steps:

For installing Satellighte, please refer to the Installation.

python training/eurosat_training.py

For optional arguments,

python training/eurosat_training.py --help

Tests

During development, you might like to have tests run.

Install dependencies

pip install -e ".[test]"

Linting Tests

pytest satellighte --pylint --pylint-error-types=EF

Document Tests

pytest satellighte --doctest-modules

Coverage Tests

pytest --doctest-modules --cov satellighte --cov-report term

Contributing

To contribute to Satellighte, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin
  5. Create the pull request.

Alternatively see the GitHub documentation on creating a pull request.

Contributors

Oğuzcan Turan

Oğuzcan Turan
Linkedin Portfolio

You ?

Oğuzcan Turan
Reserved

Contact

If you want to contact me you can reach me at can.turan.10@gmail.com.

License

This project is licensed under MIT license. See LICENSE for more information.

References

The references used in the development of the project are as follows.

Citations

Click to expand!
@article{DBLP:journals/corr/ChengHL17,
author    = {Gong Cheng and
             Junwei Han and
             Xiaoqiang Lu},
title     = {Remote Sensing Image Scene Classification: Benchmark and State of
             the Art},
journal   = {CoRR},
volume    = {abs/1703.00121},
year      = {2017},
url       = {http://arxiv.org/abs/1703.00121},
eprinttype = {arXiv},
eprint    = {1703.00121},
timestamp = {Mon, 02 Dec 2019 09:32:19 +0100},
biburl    = {https://dblp.org/rec/journals/corr/ChengHL17.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{helber2019eurosat,
  title={Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification},
  author={Helber, Patrick and Bischke, Benjamin and Dengel, Andreas and Borth, Damian},
  journal={IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing},
  year={2019},
  publisher={IEEE}
}
@inproceedings{helber2018introducing,
  title={Introducing EuroSAT: A Novel Dataset and Deep Learning Benchmark for Land Use and Land Cover Classification},
  author={Helber, Patrick and Bischke, Benjamin and Dengel, Andreas and Borth, Damian},
  booktitle={IGARSS 2018-2018 IEEE International Geoscience and Remote Sensing Symposium},
  pages={204--207},
  year={2018},
  organization={IEEE}
}
@article{DBLP:journals/corr/abs-1801-04381,
  author    = {Mark Sandler and
               Andrew G. Howard and
               Menglong Zhu and
               Andrey Zhmoginov and
               Liang{-}Chieh Chen},
  title     = {Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification,
               Detection and Segmentation},
  journal   = {CoRR},
  volume    = {abs/1801.04381},
  year      = {2018},
  url       = {http://arxiv.org/abs/1801.04381},
  archivePrefix = {arXiv},
  eprint    = {1801.04381},
  timestamp = {Tue, 12 Jan 2021 15:30:06 +0100},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1801-04381.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{DBLP:journals/corr/abs-1905-11946,
  author    = {Mingxing Tan and
               Quoc V. Le},
  title     = {EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
  journal   = {CoRR},
  volume    = {abs/1905.11946},
  year      = {2019},
  url       = {http://arxiv.org/abs/1905.11946},
  eprinttype = {arXiv},
  eprint    = {1905.11946},
  timestamp = {Mon, 03 Jun 2019 13:42:33 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1905-11946.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{DBLP:journals/corr/HeZRS15,
  author    = {Kaiming He and
               Xiangyu Zhang and
               Shaoqing Ren and
               Jian Sun},
  title     = {Deep Residual Learning for Image Recognition},
  journal   = {CoRR},
  volume    = {abs/1512.03385},
  year      = {2015},
  url       = {http://arxiv.org/abs/1512.03385},
  eprinttype = {arXiv},
  eprint    = {1512.03385},
  timestamp = {Wed, 17 Apr 2019 17:23:45 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/HeZRS15.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

-----------------------------------------------------

Give a ⭐️ if this project helped you!

This readme file is made using the readme-template

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

satellighte-0.2.2.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

satellighte-0.2.2-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file satellighte-0.2.2.tar.gz.

File metadata

  • Download URL: satellighte-0.2.2.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/36.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for satellighte-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0214affd1898e276e829906fd63b56ec0912423935eaae94575fd439369809ad
MD5 6186db62b401a775e442f78edc7211b7
BLAKE2b-256 0eeb23f7b27b776a3e28c3082ea1d376922561e0231199348b4635995ef51bfe

See more details on using hashes here.

File details

Details for the file satellighte-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: satellighte-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/36.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for satellighte-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ca12b4ccaebc33f3c0d7501e997fd64cfc1cc49624d53b7dd20ef02b43cf36f
MD5 c2fb65d93ae5f86f9a0c82401cc5a297
BLAKE2b-256 c4cfdfaeaff6cf8ffc67ddd9fbb0339e72d8b98c21acaffcb6f14abd44471caa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page