Linchakin

Synthesizing Images of Marine Plastic Using Deep Convolutional Generative Adv...

 November 19, 2021     No comments   

This is theoretical and we are working on publishing our paper. We will be applying the DCGAN architecture on the DeepTrash dataset. This is a collection of plastic images in the epipelagic layer and abyssopelagic layer of the ocean curated for marine plastic detection using computer vision. The DCGAN is a direct extension of the GAN architecture mentioned above except it uses Deep Convolutional Layers in the discriminator and generator respectively. It was first described by Radford et. al in the paper Unsupervised Representation Learning With Deep Convolutionsal Generative Adversarial Networks.

image
Aquanaut.ai Hacker Noon profile picture

Aquanaut.ai

Solving the Oceans Most Complex Problems by Making Fish Farming Smart.

image

PROBLEM STATEMENT

Marine plastic pollution has been at the forefront of climate issues for the past decade. Not only does plastic in the ocean capable of killing marine life by strangulation or starvation but it is also a major factor in warming the ocean by trapping CO2. In recent years, there have been numerous attempts at cleaning the plastic that has been circling our oceans such as by the non-profit group, The Ocean Cleanup. The problem with a lot of cleanup processes is that it requires human labor and is not cost-efficient. There has been a lot of research done to automate this process by using Computer Vision and Deep Learning to detect marine debris to utilize ROVs and AUVs for cleanup. 

Note: This is theoretical and we are working on publishing our paper. Once it gets peer-reviewed and gets published in a journal I will update this article. So, watch this space for the release of our academic paper!

Reading Resources: Our Paper on Using CV and DL to detect Epipelagic plastic, The University Of Minnesota's paper on a general-purpose marine debris detecting algorithm, and The Ocean Cleanup’s paper on floating plastic detection on rivers.

The major issue for this approach is regarding the availability of datasets to train the computer vision models. The JAMSTEC-JEDI dataset is a good collection of Marine Debris off the coast of Japan on the seafloor. But, apart from this dataset, there is a huge discrepancy in the availability of datasets. For this reason, I’ve utilized the help of Generative Adversarial Networks; The DCGAN in particular to curate synthetic datasets that could theoretically be a close replica to real datasets over time. (I wrote theoretically because there are a lot of variables such as quality of real-images available, progress with GANs, training, etc).

GAN and DCGAN

GANs or Generative Adversarial Networks were proposed by Ian Goodfellow et al in 2014. GANs consist of a simple 2 components called Generators and Discriminators. An oversimplification of the process is as follows: The Generators role is to generate new data and the Discriminators role is to distinguish between the generated data and the actual data. In the ideal scenario, the discriminator is unable to distinguish between the generated data and real data which results in ideal synthetic data points.

DCGAN is a direct extension of the GAN architecture mentioned above except it uses Deep Convolutional Layers in the discriminator and generator respectively. It was first described by Radford et. al in the paper Unsupervised Representation Learning With Deep Convolutional Generative Adversarial Networks. The discriminator is made up of strided convolutional layers while the generator is made up of convolutional transpose layers.

image

GAN architecture (source: Here)

PyTorch Implementation

In this method, we are going to be applying the DCGAN architecture on the DeepTrash dataset. If you’re not familiar with the DeepTrash dataset, consider reading my paper A Robotic Approach towards Quantifying Epipelagic Bound Plastic Using Deep Visual Models. DeepTrash is a collection of plastic images in the epipelagic layer and abyssopelagic layer of the ocean curated for marine plastic detection using computer vision.

Let's begin coding!

Installing Requirements

We start by installing all the basic requirements to building our GAN model such as Matplotlib and Numpy. We will also be utilizing all the tools (such as neural networks, transformations) from Pytorch. If you’re not familiar with PyTorch I recommend giving this article a read: 

Initializing our Hyperparameters

This step is fairly straightforward. We’re going to set up the hyperparameters that we want to train the Neural Network with. These hyperparameters are borrowed straight from the paper and PyTorch’s tutorial on training GANs.

Generator and Discriminator Architectures

Now, we define the architectures for the generator and discriminator.

Defining the Training Function

After defining the Generator and Discriminator classes, we move on to defining the training function. The training function takes in the generator, discriminator, optimization functions, and the number of epochs as the arguments. We train the generator and discriminator by recursively calling the train function until the required number of epochs. We do this by iterating through the dataloader and updating the discriminator with new images from the generator and calculating and updating the loss function. 

Monitoring and Training the DCGAN

After we’ve established the Generator, Discriminator, and Train functions the final step is to simply call the train function for the number of epochs we defined. I’ve also used Wandb which allows us to monitor our training.

Results

We plot the loss incurred by the generator and discrimination during training.

image

IMG - Generator and Discriminator Loss during Training

We can also pull up an animation of how the generator was generating images to see a difference between the real and the fake images. 

Which looks something like this:

image

And the final resulting image after training (the same image as above).

image

CONCLUSION

In this article, we discussed the use of Deep Convolution Generative Adversarial Networks to generate synthetic images of marine plastic that can be used by researchers to extend their current dataset of marine plastic. This can help with giving researchers the ability to extend their dataset with a mix of real and synthetic images. As you can see with the results, the GAN still needs a lot of work. The ocean is a complex environment with varying illumination, turbidity, blur, etc. But this is a theoretical starting point that other researchers can build off of. If you’re interested in improving the results and building a better network architecture, please reach out to me at [email protected]

Related Stories

Tags

Adblock test (Why?)


You may be interested in:
>> Is a Chromebook worth replacing a Windows laptop?
>> Find out in detail the outstanding features of Google Pixel 4a
>> Top 7 best earbuds you should not miss

Related Posts:
>> Recognizing 12 Basic Body Shapes To Choose Better Clothes
>>Ranking the 10 most used smart technology devices
>> Top 5+ Best E-readers: Compact & Convenient Pen
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • Capoae Malware Attacking Linux systems & Web Apps Using Multiple Vulnerabilities A senior security researcher Larry Cashdollar, has detected malware that is dubbed Capoae on Thursday, and this malware by exploiting the multiple vu… Read More
  • Congratulations, You've Just Learned Python I would like to devote this article to those people who, after learning Python, faced the usual problem - What next? Are you sure you have alre… Read More
  • Corel PaintShop Pro 2022 Crack + Free Activation Code [Latest] Table of Contents Corel PaintShop Pro 2022 Ultimate 24.0.0.113 Full Version [Mac] Corel PaintShop Pro Crack is an expert modifying applicatio… Read More
  • iPhone 13 battery capacities revealed — here’s what you getWe now have the numbers behind Apple’s promised iPhone 13 battery improvementsUnlike other phone manufacturers, Apple seldom talks about battery capacity in raw numbers, instead preferring to discuss it in terms of how many hour… Read More
  • 9 new movies and TV shows to watch this weekend on Netflix, HBO Max, Peacock and moreEverything from The Morning Show to Y: The Last Man to Sex Educat...The fall television season is just getting started, but already, a slew of new movies and TV shows are streaming on Netflix, HBO Max, Peacock, Hulu an… Read More
Newer Post Older Post Home

0 Comments:

Post a Comment


Copyright © 2025 Linchakin | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates