Introduction

Agriculture is the backbone of our country and needs to be given attention toward in terms of technology and development. Nowadays farmers are facing many problems for getting better yield due to the influence of small types of species, insects, rats, and snakes. Among them is the abundance of dangerous snakes. These snakes are a huge risk for everyone involved and are endangering the lives of these farmers. Roughly 46,000 people die of snake bites every year in our country which accounts for almost 50% of the deaths due to snake bites in the planet. Nearly 5% of these deaths are in agricultural fields. Some adequate measures need to be taken to solve these issues faced by farmers, especially in paddy and cotton fields.

These days or in the current situation because technology evolved, people started moving from village to city and city to huge cities. Farmers face many issues like dangerous animals or some animals entering farm fields and destroying crops due to deforestation. Earlier conjointly, this drawback was there just for sure extinct. However, in earlier days, the common problem everyone facing is snake bite deaths. About 50% of the world’s snake bite death occurs in India itself. So, there should be some technology or some mechanism to detect and give an alert about any snakes entering the nearest zone of people.

Motivation

It is evident that daily there are many incidents relating to snake bites in agricultural land. As students who have a background relating to agriculture, we were determined to improve the lives of every farmer in the country as we have seen the hardships they go through. This system, if implemented, can help farmers work without any stress or fear in their mind of getting bitten by snakes.

Problem Definition

Most snakes in fields are dangerous and due to lack of immediate medical facilities in such rural places, the accident all together must be avoided. So, these snakes must be detected before the attack and the farmer must be alarmed to avoid the catastrophe of snake bites and the untimely deaths of farmers.

Objective

The design and implementation of a model which detects snakes in open fields using edge computing and machine learning algorithms and alarm the farmers about a snake in the surrounding.

Scope

Our work is concentrated on the detection of snakes in agricultural fields. Snake bites cause a lot of problems to both humans and livestock and due to the unavailability of hospitals and immediate healthcare, we have attempted to establish a model to detect and henceforth avoid snakes. Thus, the current scope of the model is toward agriculture. This is making the lives of the people who catch snakes a lot easier as they can locate the snake first-hand, which was the major risk involved in job. Also, the image taken of the snakes can be compared to the poisonous snake species in that region whose image set is already trained. And using deep learning algorithms, we can predict the details of the snake including whether it is poisonous or not.

Existing System

Researchers are particularly interested in predicting snake behavior. Because of the enormous number of events, predicting the snake group responsible for some snake actions is challenging.

The current study aims to determine the relationship between snakes and the variables that cause them. Existing attempts have not been sufficient for forecasting. Given the proper data, machine learning algorithms can help forecast the chance of snake identification. The findings of this study can assist security agencies and policymakers in eliminating snakes by implementing appropriate and effective measures.

As a result, there is a method for studying snake behavior patterns in different regions and countries using machine learning techniques and snake-specific knowledge.

This research work’s existing system uses the identification of snake images using deep learning approaches to detect around the field the image of the intruder and classify them using image processing, comparing that image with snake image using the CNN algorithm.

Proposed System

The model being proposed here involves the detection of snakes using a machine learning algorithm. The model involves a camera which will be used to send images or a video stream to a microcontroller. Since the processing of the video requires high processing power, we have implemented edge computing for the processing of the video. Thus, the microcontroller has a module which is connected to a phone. This module sends a live stream to the phone. The phone receives the live stream and runs a program based on a machine learning algorithm to process the stream. If a snake was detected by the program, it sends a signal back to the module. The module then sends it back to the microcontroller and then sends it to the alarming system. The microcontroller and the camera will be placed in knee level of the farmer and will be connected to the phone using either Bluetooth or Wi-Fi. Using this model, snakes are detected, and the farmer is alarmed.

Literature Review

Since there are not many research papers or journals regarding snake detection models using pattern recognitions, we will first survey on papers with algorithms best suited for object or pattern recognition. Then we can separately look at the other animal detection systems proposed previously and compare the technology used in various papers and the proposed model. This will help us combine the knowledge and details acquired from the papers and use it in our proposed research for the best performance.

The proposed research examines anthropological and ethnohistorical research in the Central African forest to better understand the socio-cultural and historical relevance of snakes and snakebites. It illustrates anthropological contributions to the SBE study using literature from Southeast Asia and Latin America. It then lays out a Central African research plan that includes ethnobiology studies of snake ecologies, participatory evaluations of human–snake interactions, and interviews and participant observation of native preventative and treatment methods and knowledge. To lessen the burden of SBE, this project will work with forest communities and leaders, as well as regional and national authorities, to develop policies and practices [1].

The result of a snakebite is determined by the biting species; however, identifying the biting snake, especially in a community situation, can be challenging. We created a clinical scoring system that can be used in epidemiological surveys to identify the suspected biting species in people who have systemic envenoming and need treatment. The score was based on ten features related to bites from Sri Lanka’s five medically essential snakes, and an algorithm was created using various weightings for each element for distinct species [2].

Snakes play a crucial role in the environment, although they are not required. Deforestation hurts snakes’ habitat. Snake identification is required in various parts of the world for treatment planning, albeit it is not always possible. Snake bites are becoming more common, and knowing your surroundings may not be enough to identify the snake. To avoid this, the problem is addressed with a proposed method that can consistently identify snake species [3].

India has consistently ranked first in the world for snakebite disease. Due to the inaccessibility of antivenin and the failure to spread the infirmary promptly, the time of death is determined. We created SnakeCLEF 2020: Automatic Snake Species Documentation Challenge to provide an evaluation platform and labeled data (including geographic information) for biodiversity and health research. SnakeCLEF 2020 was created to provide a valuation stage that can assist in the presentation of end-to-end AI-driven snake class recognition enterprises [4].

A healthy and precise AI-driven system as a support tool for snake class identification has enormous potential to help reduce snakebite-related deaths and incapacities. With this in mind, we developed the SnakeCLEF 2021: Instinctive Snake Classes Identification Test with Country Level Emphasis, which serves as an evaluation platform for end-to-end AI-driven snake class classification systems, with a focus on overall country performance [5]. Snakebite fatalities and healthcare breadwinners can help freeze snake documentation and new methods [6].

The cylinder performs a non-linear feature change on descriptors, then combines the results into image-level pictures and applies a class-section model. We propose innovative explanations for all three processes, making our technique more appealing in theory, scalable in the division, and clear in categorization. Pascal uses the state of temperament. Object detection, object discovery, object organization, YOLO technique, image processing [7].

The highest rate of occurrence, according to Maharashtra, is 70 tastes per 100,000 people and 2.4 per 100,000 each year [8]. Object detection is one of two modules used by the future organization, while cataloging is the other. The thing discovery module will detect a snake as an object under influence, and the group module will classify the object into appropriate snake classes [9].

Building reliable proof of species independence, geographic distribution, and evolution is critical for humanity’s long-term survival as well as biodiversity protection. The difficulty in distinguishing plants and animals in the yield, on the other hand, is preventing the grouping of new CNN technology [10].

The classification of snakes has always been problematic for zoologists due to the lack of limbs and other areas where variation is normally seen. If its history is similar to that of other Vertebrata orders, an order that dates from the Cretaceous period and has expanded over the globe must have evolved in structure. Anatomists’ researches, however, have only turned up characteristics that designate five suborders and approximately a dozen families. One of the natural groups, thus, described, the Colubridae, encompasses three-quarters of the species and has a worldwide distribution. As long as this was the primary effect, it was evident that the order’s stronghold had not yet been conquered [11].

Snake species identification based on photos is critical for immediately treating snake bite victims with the appropriate antivenom. This assignment is the topic of the SnakeCLEF 2020 challenge, which is part of the Life CLEF research platform and includes snake photos and accompanying geographical information [28]. The FHDO Biomedical Computer Science Group (BCSG) took part in this competition, as described in Mask R-CNN for object detection, numerous image pre-processing processes, Efficient Nets for classification, and other ways to integrate image and location information are all part of the machine learning workflow [12].

Pre-processing, feature extraction, and classification were all used in the NLP processing of the descriptions, which were supplied in unstructured text. During training and classification, four machine learning methods (Naive Bayes, k-Nearest Neighbor, Support Vector Machine, and Decision Trees J48) were utilized. The J48 algorithm, with high precision and recall, had the maximum classification accuracy of 71.6 percent correct prediction for the NLP-Snake data set [13].

In automatic image categorization systems, CNN is widely employed. In most cases, characteristics are extracted and used for classification. Because artificial neural networks are used to implement deep learning, it is successful at recognizing objects in photos. With the development of deep learning algorithms, image classification problems have become more popular. Snakes have yet to be classified using an automated classification system. The method that will be built will be useful in correctly identifying snake species and taking the appropriate action [14].

The diversity of poisonous snakes and their potential for harming humans has been thoroughly documented. As a result, this information can be used as a foundation for any preventive action in the face of snake toxins and their physiopathological and clinical impacts. Every year, more than 20,000 deaths are caused by high intervention in epidemiological and clinical settings around the world [15].

One of the most pressing challenges in e-commerce and intranets is security. This chapter covers a variety of hacking attacks that hackers may undertake against businesses, as well as the strategies employed to counter each attack. The chapter also discusses integrated security systems (ISS), which protect two parties from a range of network assaults by automatically securing communication between them. Finally, the chapter discusses the legal concerns that a firm may face if it fails to appropriately secure its systems and suffers losses [16].

This project aimed to incorporate snake farming into the Animal Production curriculum in Colleges of Agriculture in South-East Nigeria for long-term health and security. The study included 130 participants, including 93 animal science professors from universities and 37 animal production instructors from agricultural colleges. The population was small; hence, the sample size for the study was limited [17].

It is believed that it causes up to 138,000 deaths and 400,000 lasting disabilities per year, including blindness and limited mobility. The most vulnerable people are those who live in areas where venomous snakes exist alongside a lack of access to healthcare and appropriate treatment [18].

Snakebite fatalities are most typically caused by a delay in accessing a health center or consulting a quack, who often uses incorrect procedures. Few attempts have been undertaken to assess public understanding of venomous snakes, first aid, and superstitions [29]. Cat snake, Russell viper, and Common krait were the hardest to identify. Non-venomous snakes were found to be venomous in 2/3 of the cases. When bitten by a snake, they used techniques such as tying a tight tourniquet over the injury, making incisions and seeing a traditional therapist.

Conclusion. Even though preventive actions were deemed to be necessary, the majority of the subjects did not take them [30]. There is an urgent need to organize educational programs to raise public awareness of snake identification, snake bite management in the field, and other topics [19].

Systematic attempts to identify and classify common snakes in various Indian states have yet to be made, and there is no definitive data on the subject. However, the published literature indicates that some snake species are more common in one region than in others, such as saw-scaled vipers in Rajasthan. We looked at the published literature from different locations in India and discovered that the snake bite profile in India has a North–South divide. North India has a higher rate of neurotoxic envenomations than South India, which has a higher rate of hepatotoxic envenomations. Local necrosis, gangrene, and compartment syndrome are all symptoms of Russell’s viper [20].

Snakebite is a medical emergency that can be fatal. As of January 2020, the Reptile Database had 3750 species listed worldwide. Snake bites affect 4.5–5.4 million people per year, with 1.8–2.7 million developing clinical disease and 81,000–138,000 individuals dying as a result of the bite. There are around 300 species in India, 52 of which are venomous. Although the total number of bites may exceed 5–6 lakhs, only about 1,80,000 bites (30%) are venomous. According to a new study published in 2020 by Wilson Suraweera et al., snakebite causes 58,000 deaths each year in the United States. According to the study, 70 percent of these deaths happened in eight states of India. The age-standardized death rate in these high-burden states was around 6/100,000, with half of all deaths occurring between June and September. Russell’s vipers were responsible for the majority of envenomations (43.2%), followed by kraits (17.7%) and cobras (13.7%). (11.7%) [21].

Between January 1998 and January 2001, 91 snakebite cases were admitted to the general hospital in Mahad, Maharashtra, India, 180 km south of Mumbai. When they were admitted to the hospital, 29 (31.9%) of the patients brought the snakes that had bitten them (20 kraits, 9 Echis carinatus). Forty-five patients (49.5%) suffered snakebite without envenomation; 27 patients had local fang marks without local or systemic symptoms, and 18 patients had local edema 24 h after the bite. Twenty-six patients (28.6%) were paralyzed. There were no local symptoms of envenoming in twenty-five patients that reported between midnight and 8:00 a.m [6, 22].

In modern India, snakebite is still an underappreciated cause of accidental fatality. Because India accounts for a major share of world snakebite totals, global snakebite totals may potentially be underestimated. Snakebite deaths in India should be reduced by community education, adequate medical staff training, and better delivery of antivenom, particularly in the 13 states with the highest occurrence [23, 24].

Using multivariate analysis of a variety of morphological features, the population affiliations of Asiatic cobras of the genusNaja are studied. Previously assumed monospecific, this complex now contains at least eight species. Species that require various antivenoms for their bites can sometimes coexist [31]. The new knowledge of the Asiatic cobra complex’s systematics begs for a rethinking of cobra antivenom use in Asia, as well as greater research into venom composition [25,26,27].

Comparative Study

Table 1 has clearly shown the difference between the identification, processing data, speed, and accuracy.

Table 1 Comparison between the identification, processing data, speed, and accuracy

Proposed Research Framework

The architecture diagram depicts the series of events in the proposed research shown in Fig 1. Input is taken through a camera in the form of a video. A video is basically a stream of images. Video processing is performed on one frame after another. We obtain weights for the YOLO model after training the model for image dataset. We load the weights into a Deep Neural Network using Computer Vision and compile the neural network. We pass each frame through this neural network. Each frame is evaluated, and detections are appended to a list. We calculate IoU(confidence) for each detection. If confidence is above a threshold, only then the detection will be considered for future operations. Else, it will be rejected.

Fig. 1
figure 1

Proposed architecture for identification of snakes using YOLO algorithm

Many boxes for the same object may cross the threshold resulting in multiple boxes for the same object. We employ Non-Max Suppression to take care of this problem. Non-Max Suppression results in a single box if any snake is present by erasing all the boxes with less confidence value. If a snake is not present in the frame, it will be discarded, and the next frame will be brought in for processing. If a snake is present, the co-ordinates of the starting pixel, width and height are derived from the detection list. These parameters are used to draw a bounding box around the snake and show to the user. An alerting system is employed to notify the user whenever a snake is detected. The alerting system consists of a buzzer sound that will be played whenever a snake is detected. The frame will be discarded after this step and a new frame will be brought in for processing.

Once the snake is detected, we will send an immediate notification to the valid mobile number as the snake is detected [32, 33]. After that, we are applying the YOLO algorithm which is useful. Then finding is classified for the prediction step. So here we are using a Raspberry pi board, it will be working on the CPU and then the camera should be connected to a USB port, and we can connect the camera [34]. The outcome will be applying the YOLO algorithm. So that we conclude snake prediction is complete and then the snake will be detected, and buzzer sound will be coming as shown in Fig. 2. The verification process [35] and validation activities are followed as specified in [36].

Fig. 2
figure 2

Overall data flow diagram (DFD) of proposed system

Overall Data Flow Diagram (DFD)

Algorithm

Step 1: Start.

Step 2: Raw images are collected.

Step 3: Reading the images.

Step 4: Image pre-processing in NumPy format and stored in pickle format.

Step 5: Training the model with the YOLO algorithm.

Step 6: Obtaining the model.

Step 7: Testing the model with a new image.

Step 8: Stop.

Sample Data Sets Used for the Proposed Research

About 5000 photos make up the data set used for images, while 70 videos make up the data set used for videos. Testing will be carried out after the images have been trained. The accuracy will, therefore, be shown depending on the photograph. Accuracy may vary, as stated in Table 2 above, and will not always be the same. The size, shape, and color of the snake were noted; this may vary depending on the photographs.

Table 2 Sample training datasets used for images

Testing will take place after the videos have been trained. Therefore, based on the specific footage, it will demonstrate the accuracy. Accuracy may vary, as stated in Table 3 above, and will not always be the same. The size, shape, and color of the snake have been seen; this may vary depending on the footage.

Table 3 Sample training datasets used for videos

Result and Analysis

The Yolo model has been taught to detect the snake automatically. The model was tested using an image, and it accurately identified whether or not it was a snake. The model was trained using a snake as an input. Figure 3 shows the results in snapshots when the model had no trouble identifying the snake. Figure 3’s representation of the snake in a bounded box shows that 100% of the time it could recognize that it was a snake. This section explains the outcomes of the suggested model.

Fig. 3
figure 3

Results obtained by proposed model for snake detection

In the above Fig. 4, it has clearly explained the current average loss, iteration, approximate time left in hours, and the configuration of max batches.

Fig. 4
figure 4

Chart snake custom configuration for video

Conclusion and Future Work

The proposed system has been successfully implemented with accuracy outperforming most of the existing models. This model to detect snakes will bring about tremendous changes in agriculture-related technologies. In future, there is a major scope for this project as the first reason being that the project involves agriculture and that will always remain unlike other industries which may decline due to the economy. The detection model is made using YOLO real-time detection algorithm. Machine learning’s subset deep learning techniques have been studied in detail including their architecture with the purpose to improve the model. These models will be cost effective and usable by farmers across the country.

In future, we would like to improve the proposed model by trying to implement the model as an edge computing device. This will result in even faster detections and immediate warning systems for the farmers rather than it being connected to some far away server. We would not only detect snakes but try to provide the details regarding the species whether it may be poisonous or not. This model is fast, robust, and simple to use for any common man.