A chicken flu detection system based on AIoT technologies can aid in early detection, monitoring, and control of the disease, potentially reducing its impact on poultry populations, preventing further spread, and safeguarding public health.
Chicken flu, also known as avian influenza, is a highly contagious viral disease that affects birds, including domestic poultry. Early detection is crucial to prevent the spread of the disease and minimize its impact on poultry populations. An AIoT-based detection system can help identify infected chickens quickly, allowing for prompt intervention and control measures. By continuously monitoring the audio and potentially other sensor data of poultry, the system can provide real-time insights into the health status of the birds. This monitoring can help detect any unusual patterns or deviations from normal behavior, indicating the possible presence of chicken flu or other health issues. Chicken flu can have severe consequences for poultry farms, including significant economic losses. By detecting the disease early, farmers can implement preventive measures such as isolating infected chickens and initiating treatment. An AIoT-based system can automate the detection process, reducing the reliance on manual inspection and subjective judgments.
For detection, we used microphone on Arduino Nano 33 BLE Sense. We implemented ML with the help of Edge Impulse.
Machine learningSince we didn't have access to a dataset for sick chicken sounds, we opted to collect two classes of audio samples instead: normal chicken sounds and goat sounds. While using goat sounds instead of sick chicken sounds may not provide accurate detection specifically for chicken flu, it allowed us to create a proof-of-concept or a preliminary version of our project. This initial version can serve as a starting point, and in the future, if we can obtain a more relevant dataset that includes sick chicken sounds, we can enhance the accuracy and specificity of our detection system.
We created a new project on the Edge Impulse platform and uploaded our audio samples. Edge Impulse allowed us to label the samples with the corresponding classes (normal chicken sounds and goat sounds). We used the MFE (Mel-Frequency Energy) processing block to extract features from the audio samples and then trained a machine learning model.
Once our model was trained, we evaluated its performance using test data to assess its accuracy and effectiveness in distinguishing between normal chicken sounds and goat sounds.
After training and evaluating our model, we deployed it onto the Arduino Nano 33 BLE. Edge Impulse provides integration support for various microcontrollers and edge devices, allowing us to run our trained model directly on the Arduino Nano 33 BLE.
ConnectivityIn order to receive data from the Arduino in our app, we decided to utilize its Bluetooth connectivity. The Arduino Nano 33 BLE as its name suggests has Bluetooth low energy mode capabilities which would allow us to have the Arduino even battery powered if it is necessary, for instance while it is placed in the chicken coop.
The Arduino sketch provided is based on an example for machine learning generated from the Edge Impulse platform. It has been modified to include custom Bluetooth Low Energy (BLE) functionality.
The sketch begins by including the necessary libraries, including the ArduinoBLE library and the "MIS_inferencing.h" header file for running the Edge Impulse classifier.
Next, the BLE service and characteristic UUIDs are defined using the BLEService and BLECharacteristic classes. The service UUID is set to "181A" as it is environment service, and the characteristic UUID is set to "5895becc-3aea-4366-82af-369ec681414f". The characteristic is configured for reading and notification.
The Edge Impulse settings are then defined using preprocessor directives. These settings include the number of slices per model window, the number of raw samples, and the classification frequency.
The main functionality of the sketch involves updating the custom BLE characteristic each time the machine learning prediction changes. This is achieved by running the Edge Impulse classifier and retrieving the prediction value. The result.classification[x].value is then updated with the new prediction value and sent as a notification to any connected devices.
This modified sketch combines machine learning capabilities with Bluetooth Low Energy communication, allowing the Arduino to make predictions and provide real-time updates to connected devices via BLE.
Android AppThe main purpose of the application was to receive data about the chickens' health status. It performs as a notification device to inform the farmer if a chicken is healthy or not.
- Firstly, the user enables Bluetooth connectivity on his/hers device and opens the application where they can choose the Arduino device that they want to connect to.
- Once the Arduino device is chosen, the user clicks on one of the specific characteristics that the device offers, in this case it is the characteristic for interpreting the health status of the chickens.
- Finally, the user is taken to another screen which displays the health status of the chickens.
- A video of the operation of the application is given below.
Comments
Please log in or sign up to comment.