This project is Undergraduate Research Project (URP), it took our team a year to finish this. Though our team has three members, we fully participate in every process when we did this, in order to learn more knowledge. Here, I will only talk about my works.
It is difficult to keep track with each cow in dairy farm, while it is crucial because we need to know the status of each cow. For example, if we know how much food it eat, we may analyse that which cow is more easily to get sick, and we can do some security measure to prevent it.
Therefore, we decided to solve this problem by 4 parts. First, collect and tag image data from dairy farm. Second, train the target detection neural network (use tensorflow) with this data, and provide the detection interface to user. Third, train the image classification neural network. So that we could take the frame of video, locate the cow in the image by target dection network, and identify the cow by classification (I will not demonstrate image classification part, because it is not my work). Finally, we set up a website for dairy farmer, and using the detection interface to detect the cows in the video.
The data was collected in December 14th, 2019, in Shunyi, Beijing. We took three parts of cow’s body, which are the cow’s back, the cow’s side and the cow’s head. Among them, there are about 400 pictures and 10 videos for the cow’s back, 700 pictures and 20 videos for the cow’s side, and 150 images and 10 videos for cow’s head.
After data cleansing, I tag the data by LabelMe.
Then, I use four methods to augment the data set: translation, horizontal flip, change contrast and brightness, and expand and shrink.
For the video data, I took the frame of the video to do the detection.
In this process, I used two methods to detect the cow. One is classical target dectection algorithm, the other is deep learning Faster RCNN. Finally, I choosed deep learning.
We use C# aspx as our backend website language, MVC architecture. There are 5 mainly part of our website:
The front page of website:
Upload and manage user’s own cows pictures
Train the network by the new cows pictures
You can examine the training log at any time
After training the cow pictures, you can watch the realtime video target detection and identity recognition.
To see more about the project, please click here.