Inspiration

Ophidiophobia. Is it rational or irrational to be scared of snakes ? Of course, they can potentially kill you with a single bite, but can they ? Certainly not. Certainly not all of them. When we learned that only 20% of all snake species are venomous and only 7% are deadly to humans, out of which most are safely nestled in the dense jungles or deep seas, and yet there are plenty of snakes hacked or stoned to death throughout the world and in our country (India) and especially around our neighborhood, we wanted to know if there is a way to create awareness among people that the snake they encountered could potentially be completely harmless. We scanned the internet for solutions and didn't find anything satisfactory, so we set out to build one. There were image based snake classifiers already available, but they were trained on high resolution images and couldn't predict with accuracy if the input image was shaky or of lower resolution. Moreover, very few snake encounters provide the space or time for a decent image of the snake, either the snake or the human flees the spot, but we always remember what the snake looked like. What if that's all we needed to know ? We decided to build a Snake Classifier based on key descriptions from the spotter, the aim was to build a framework where the user (someone who has encountered a snake) can input a set of chosen characteristics of the snake, to identify the snake, provide some information on the snake and some recommendations on how to deal with it. The use of this framework could save a lot of snakes from getting killed, save the fear and anxiety of a venomous snake living in the backyard and generally raise awareness on our slithering neighbors.

What it does

Snake Eyes lets the user know the kind of snake that they encountered, by inputting the snakes' description like length, head shape, color, patterns on the body etc. The framework classifies the snake based on the description, and also gives information on whether the snake is venomous, dangerous or not. If the snake is venomous, the framework also gives vital information on the type of venom and how it affects the body, this could be critical in case of a bite. Snake Eyes is trained only on sixteen common snake species in India.

How we built it

To build Snake Eyes, we needed data as the first step. We sourced the data from the internet, processed the data to identify the key characteristics for each snake. Then we built a model which was trained on the characteristics of the snakes, tested the predictive accuracy of the model and once it was satisfactory, wrapped the framework with UI like a python, with python.

Steps involved in building Snake Eyes :

  1. Collection of data from the internet (Identifying the right sources) [Web Scraping]
  2. Understanding and Processing the data into a trainable format [Language Processing]
  3. Training the model on the processed data [Machine Learning]
  4. Building the classifier and testing the results
  5. Final touches [User Interface]

Challenges we ran into

Collection and processing of the data was the toughest challenge, there is no readily available data on the internet which is direct and unambiguous on snake characteristics, especially on snakes found in India.

Identifying the key characteristics posed it's own challenges. There are plenty of ways to describe a snake, we had to build something that figures out which are the most important and relevant characteristics to identify a snake.

Testing the model, the required real life snake expertise was hard to find, to know if the model we built predicted the snake accurately.

Accomplishments that we're proud of

Snake Eyes certainly had good vision. The framework predicted with over 94% accuracy on a generated test dataset, but this still lacked any human interaction. So we asked people to describe a snake on an image, and shared the description to Snake Eyes, which was still able to predict the snake with over 95% accuracy.

What we learned

Internet does not have all the answers, but it has data, a lot of it. Identifying and defining methods of collecting and processing of data is perhaps the most crucial aspect of this project, as important as the classifying method itself

Sometimes, the simpler solution is the right one. When compared with an image based classification framework, Snake Eyes performed much better, especially considering real life use cases

What's next for Snake Eyes (Deciphering Serpents from Description)

There are so many enhancements that can be done to Snake Eyes.

The most important one would be to expand the database, collect more and reliable data, for which we have reached out to organizations like the Jim Corbett National Park in hope that they could provide us the data we are looking for. Expanding the number of snakes the database is trained on and improving accuracy will be the goal of this enhancement.

Another feature we really wanted to implement but we caught short on time was adding geolocation to the framework. With geographical data, the model can be trained on the snakes that are available in that location and will perform better.

Beware of snakes :) here

Share this project:

Updates