Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Land Cover Mapping using Image Processing #503

Closed
abhisheks008 opened this issue May 5, 2024 · 26 comments · Fixed by #813
Closed

Global Land Cover Mapping using Image Processing #503

abhisheks008 opened this issue May 5, 2024 · 26 comments · Fixed by #813
Assignees
Labels
gssoc Girlscript Summer of Code 2024 level2 Level 2 for GSSOC Status: Assigned Assigned issue.

Comments

@abhisheks008
Copy link
Owner

Deep Learning Simplified Repository (Proposing new issue)

🔴 Project Title : Global Land Cover Mapping using Image Processing

🔴 Aim : The aim is to analyze the dataset using image processing and deep learning methods and find out the best fitted model for this dataset.

🔴 Dataset : https://www.kaggle.com/datasets/aletbm/global-land-cover-mapping-openearthmap

🔴 Approach : Try to use 3-4 algorithms to implement the models and compare all the algorithms to find out the best fitted algorithm for the model by checking the accuracy scores. Also do not forget to do a exploratory data analysis before creating any model.


📍 Follow the Guidelines to Contribute in the Project :

  • You need to create a separate folder named as the Project Title.
  • Inside that folder, there will be four main components.
    • Images - To store the required images.
    • Dataset - To store the dataset or, information/source about the dataset.
    • Model - To store the machine learning model you've created using the dataset.
    • requirements.txt - This file will contain the required packages/libraries to run the project in other machines.
  • Inside the Model folder, the README.md file must be filled up properly, with proper visualizations and conclusions.

🔴🟡 Points to Note :

  • The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.
  • "Issue Title" and "PR Title should be the same. Include issue number along with it.
  • Follow Contributing Guidelines & Code of Conduct before start Contributing.

To be Mentioned while taking the issue :

  • Full name :
  • GitHub Profile Link :
  • Email ID :
  • Participant ID (if applicable):
  • Approach for this Project :
  • What is your participant role? (Mention the Open Source program)

Happy Contributing 🚀

All the best. Enjoy your open source journey ahead. 😎

@abhisheks008 abhisheks008 added the Status: Up for Grabs Up for grabs issue. label May 5, 2024
@tushtithakur
Copy link

Hi , I'm excited to contribute to this project. Could you please assign me? Looking forward to getting started! @abhisheks008

Full name : Tushti Thakur
GitHub Profile Link : https://github.com/tushtithakur
Email ID : [email protected]
Approach for this Project : Implement different deep learning algorithms using the dataset, evaluate it and compare performance.
What is your participant role? GSSoC 2024

@abhisheks008
Copy link
Owner Author

Hi @tushtithakur wait for the induction session to complete by today evening, after that issues will be assigned to the contributors.

@tushtithakur
Copy link

@abhisheks008 Sure sir, I'll wait for the induction session to be completed. Thank you for the update!

@ArismitaM
Copy link
Contributor

Hi, I would like to contribute to this project. I have recently been part of a hackathon where I have used image processing.

Full name: Arismita Mukherjee
GitHub Profile Link: https://github.com/ArismitaM
Email ID: [email protected]
Approach for this Project: I will implement different models and datasets to arrive at a better-performing model.
What is your participant role? GSSoC '24

@abhisheks008
Copy link
Owner Author

Hi @ArismitaM can you clarify more on the algorithms/models you are planning to use here?

@ArismitaM
Copy link
Contributor

I am planning to use YOLOv5 to train for land cover and identify the same

@abhisheks008
Copy link
Owner Author

I am planning to use YOLOv5 to train for land cover and identify the same

I know YOLO is a go to option for this kind of datasets. Can you share some other approaches along with the YOLO one?

Basically here in this repo, we used to ask our contributors to implement at least 2-3 models for the same dataset, check their accuracy scores and then conclude that some x is the best fitted model for this project. I hope you understand my point.

@ArismitaM
Copy link
Contributor

I am planning to use YOLOv5 to train for land cover and identify the same

I know YOLO is a go to option for this kind of datasets. Can you share some other approaches along with the YOLO one?

Basically here in this repo, we used to ask our contributors to implement at least 2-3 models for the same dataset, check their accuracy scores and then conclude that some x is the best fitted model for this project. I hope you understand my point.

I can use VGG16 or ResNet50 too as different models compared to YOLO

@ArismitaM
Copy link
Contributor

I am planning to use YOLOv5 to train for land cover and identify the same

I know YOLO is a go to option for this kind of datasets. Can you share some other approaches along with the YOLO one?
Basically here in this repo, we used to ask our contributors to implement at least 2-3 models for the same dataset, check their accuracy scores and then conclude that some x is the best fitted model for this project. I hope you understand my point.

I can use VGG16 or ResNet50 too as different models compared to YOLO

I will use vgg16, resnet50, yolo, and inceptionv3 and then do a comparative study to analyze which model works the best and yields a better result for this issue. Please assign this task to me

@abhisheks008
Copy link
Owner Author

Cool! Issue assigned to you @ArismitaM

@abhisheks008 abhisheks008 added Status: Assigned Assigned issue. level2 Level 2 for GSSOC gssoc Girlscript Summer of Code 2024 and removed Status: Up for Grabs Up for grabs issue. labels May 14, 2024
@ArismitaM
Copy link
Contributor

ArismitaM commented May 16, 2024

Hi @abhisheks008, I have downloaded the Kaggle dataset and have gone through its contents. The images as well as the labels are .tiff files. The readme file provided with the Kaggle dataset does not explain the structure of the information in the dataset except for mentioning the hexadecimal number associated with each label. From this, I have the following inference:

  • The image .tiff file is just a single layer of image
  • The .tiff file for the corresponding label contains a layer of image that contains the areas associated with the label of this layer.

I will have to use this information structure to create bounding boxes for each of the land cover types to train YOLO with. It would help me if you could confirm whether my understanding of the information content in the .tiff files is correct or not.
If I have misunderstood, kindly provide the structure of the information in the tiff files.

@abhisheks008
Copy link
Owner Author

Hi @abhisheks008, I have downloaded the Kaggle dataset and have gone through its contents. The images as well as the labels are .tiff files. The readme file provided with the Kaggle dataset does not explain the structure of the information in the dataset except for mentioning the hexadecimal number associated with each label. From this, I have the following inference:

  • The image .tiff file is just a single layer of image
  • The .tiff file for the corresponding label contains a layer of image that contains the areas associated with the label of this layer.

I will have to use this information structure to create bounding boxes for each of the land cover types to train YOLO with. It would help me if you could confirm whether my understanding of the information content in the .tiff files is correct or not. If I have misunderstood, kindly provide the structure of the information in the tiff files.

You are going in the right direction. 🚀

@ArismitaM
Copy link
Contributor

Hi @abhisheks008, I have analyzed the data set.

This is an image present in the dataset under the directory images/train

Screenshot from 2024-05-18 19-19-43

Each image has 3 layers, so below are the layers of the above image:

Screenshot from 2024-05-18 19-20-01

Screenshot from 2024-05-18 19-20-09

Screenshot from 2024-05-18 19-20-16

There is a corresponding label/train which has 1 layer with coloured label

Screenshot from 2024-05-18 19-20-38

@abhisheks008
Copy link
Owner Author

@ArismitaM looks good to me.

@ArismitaM
Copy link
Contributor

With reference to my comment above, I have a few queries,

  1. In the images directory as well as the label directory, there is a folder called 'val' which also contains images, but I have not understood where to use them.
  2. There are 3 layers for each image and a corresponding label for it. I want to understand the purpose of the 3 layers for each image.
  3. How is the information organized for each image and corresponding label?

@abhisheks008
Copy link
Owner Author

Query 1:

The val directory typically stands for 'validation'. In machine learning and deep learning, datasets are often split into three sets:

  • Training set: Used to train the model.
  • Validation set: Used to evaluate the model during training and tune hyperparameters.
  • Test set: Used to evaluate the model's performance after training is complete

Query 2:

The three layers in each image likely represent the three color channels in the image: Red, Green, and Blue (RGB). Each layer corresponds to the intensity of that color in the image:

  • The first layer shows the intensity of the red color.
  • The second layer shows the intensity of the green color.
  • The third layer shows the intensity of the blue color.

When these layers are combined, they form a full-color image.

Query 3:

Each image in the dataset is organized with its corresponding label, which likely represents the segmentation or classification information. Here's a typical structure:

  • Images Directory: Contains subdirectories for training and validation images.

    • images/train: Contains the training images, each having three layers (RGB channels).
    • images/val: Contains the validation images, each having three layers (RGB channels).
  • Labels Directory: Contains subdirectories for training and validation labels.

    • labels/train: Contains the training labels, usually a single-layer image where each pixel value represents a class label.
    • labels/val: Contains the validation labels, similarly structured to the training labels.

Three layers for each image are the RGB channels that combine to form the full-color image. The label image uses colors to represent different classes or segments corresponding to regions in the input image. The 'val' directory contains data for validation purposes, used to tune and evaluate the model during training.

Example:

  • Image Layers (RGB):

    • Red Channel (Layer 1):
      Screenshot from 2024-05-18 19-20-01

    • Green Channel (Layer 2):
      Screenshot from 2024-05-18 19-20-09

    • Blue Channel (Layer 3):
      Screenshot from 2024-05-18 19-20-16

  • Corresponding Label:
    Screenshot from 2024-05-18 19-20-38

@ArismitaM

@ArismitaM
Copy link
Contributor

Thank you for the clarification @abhisheks008.
I am able to understand the structure of information in the dataset.

@ArismitaM
Copy link
Contributor

Hi @abhisheks008, I am writing a code that will draw bounding boxes around the objects with the same colour in the labels image (different colours are used for different classes) and generate a .txt file for it.
Do you think that this is an optimal method to do it?

@abhisheks008
Copy link
Owner Author

Hi @abhisheks008, I am writing a code that will draw bounding boxes around the objects with the same colour in the labels image (different colours are used for different classes) and generate a .txt file for it. Do you think that this is an optimal method to do it?

If it is working with the development, then go for it.

@ArismitaM
Copy link
Contributor

Hello @abhisheks008,
I have clustered the points of each of the classes using DBScan. PFA is the plot of a label and its corresponding cluster. Similar clusters have been created for all the labels in a raster file.

label
Screenshot from 2024-05-31 10-43-17

cluster
Screenshot from 2024-05-31 10-44-34

@abhisheks008
Copy link
Owner Author

Hello @abhisheks008, I have clustered the points of each of the classes using DBScan. PFA is the plot of a label and its corresponding cluster. Similar clusters have been created for all the labels in a raster file.

label Screenshot from 2024-05-31 10-43-17

cluster Screenshot from 2024-05-31 10-44-34

Looks good to me. Any issues with this?

@ArismitaM
Copy link
Contributor

Hello @abhisheks008, I have clustered the points of each of the classes using DBScan. PFA is the plot of a label and its corresponding cluster. Similar clusters have been created for all the labels in a raster file.
label Screenshot from 2024-05-31 10-43-17
cluster Screenshot from 2024-05-31 10-44-34

Looks good to me. Any issues with this?

no issues with this, I was giving an update

@ArismitaM
Copy link
Contributor

ArismitaM commented Jun 1, 2024

I have drawn bounding boxes around the clusters and this is how it looks:

Screenshot from 2024-06-01 11-01-25

Screenshot from 2024-06-01 11-00-27

Screenshot from 2024-06-01 11-00-44

Screenshot from 2024-06-01 11-01-01

@ArismitaM
Copy link
Contributor

Hello @abhisheks008 ,
Here is an update:
I have trained this model in YOLOv5 using GPU successfully.
I tried using VGG but I realized that it was not ideal for object detection.
Then I moved on to RetinaNet. The first round of training worked well with CPU but it did not work with my GPU due to lack of memory. So, I have switched to training with CPU which is why it is taking time for the training process.

@abhisheks008
Copy link
Owner Author

Hello @abhisheks008 , Here is an update: I have trained this model in YOLOv5 using GPU successfully. I tried using VGG but I realized that it was not ideal for object detection. Then I moved on to RetinaNet. The first round of training worked well with CPU but it did not work with my GPU due to lack of memory. So, I have switched to training with CPU which is why it is taking time for the training process.

Looks pretty good. Carry on!

Copy link

Hello @ArismitaM! Your issue #503 has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc Girlscript Summer of Code 2024 level2 Level 2 for GSSOC Status: Assigned Assigned issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants