Whale Detection Using Aerial Images

Photo by Lacey on Dribbble

This notebook’s aim is to create a model that can used by drones so that they can themselves detect and report whales when they surface

Whales are mammals, so they feed milk to their babies and breathe air. Since whales are not fish they do not have gills, so they cannot breathe underwater. They must come up to the surface of the water to get air. The air is breathed in and out through their “blowhole,” which is on their back

Lets have a look at the dataset we have created.

As you can see there are mainly 2 section:

  1. Contains Whales (True)

2. Contains other Animals (False)

Now lets move with the preprocessing

The data is then stored in Data (Containing Images) and labels( Containing 1 : for Whale and 0: for Not Whale). This is the randomly shuffled and using to create training and testing dataset using sklearn.

https://gist.github.com/Rodio346/40258ffdcff1fdde1adb459c8e9d8be4

After preprocessing comes our Model

https://gist.github.com/Rodio346/405411270252f2505292164ec2540e24

This model takes height , width, channels of the images and also the classes to be classified as input.

The model is then trained using Adam optimizer with categorical_crossentropy for 20 epochs having batch size 32.

Wondering how the model performed

The graphs will show themselves how the model has performed

As you can see that the achieved accuracy is tending to 99%. which is all we need from a good model.

With the help of this model we create intelligent drones capable of tracking whales on their own which will shorten the response time as right now the image from the drone is sent to a system which will then identify a whales while after our implementation it will directly take care of the whales and directly notify the user.

To have a look at the complete notebook

Use this notebook : https://cainvas.ai-tech.systems/use-cases/whale-detection-app/

Credit : vishal yadav