Egg counting in a poultry farm: 14 production units, 114 cameras and 207 counting zones

Summary
Client. A large producer of chicken eggs. The company’s production facilities occupy 15,000 m². The company employs more than a thousand people.
Task. Implement egg counting with video cameras in 14 production halls.
Result. The CamContador counter is successfully working. The counting accuracy is 99.90-99.93%.
Situation
Birds at the factory are housed in tiered cage batteries. Usually there are 7-8 batteries in the workshops. Each unit collects a certain number of eggs per day.
Monitoring the egg production of the batteries helps to draw the right conclusions to evaluate the performance of the factory. For example:
If you change the diet in one battery and leave it the same in the others, you can estimate the effect of feed on egg production by the number of eggs collected. And make a decision about its adjustment.
If, for no apparent reason, one battery has fewer eggs than the others, the housing conditions may have deteriorated and it’s time to check the equipment. Maybe the water drinker is clogged or the lighting in the workshop is broken.
In order to conduct such experiments, it is necessary to count the number of eggs at each stage of production and for each battery. To do this, a technical solution is needed to measure all the indicators: the production flow entering the plant, the number of eggs produced in the batteries and the output flow.
Often, special counters installed on the equipment are used for such counting. However, according to our data, the CamContador egg counting technology is many times cheaper, and its accuracy matches that of hardware counters. There is no need to buy expensive specialized equipment – you only need video cameras and a computer. The guaranteed accuracy of the egg counter is specified in the contract and is not less than 99.8%.
Having agreed with the above arguments, the factory management chose the CamContador video counter.
The challenge
The client has set the task of implementing egg counting in 13 workshops. Each hall should have between 15 and 18 counting areas. The counting areas include the eggs entering and leaving the production units, as well as the left and right side of the cage batteries where the eggs enter the conveyor belt.
The math is simple. The input stream and the eggs from all the batteries should add up to give the output stream of the shop.
Solution
Usually, customers have no more than 10 video cameras in their workshops, which monitor a certain area. This number is sufficient for counting cans, for counting bread, and for counting poultry carcasses. In the first workshop where we started working, there were 16 counting points at once.
Set up the shooting parameters
The first difficulty we encountered was processing too large a volume of data. At first, the processor did not even have time to process all the video streams. We had to lower the resolution and quality of the footage and simplify the parameters of the neural network so that the computer could cope with the task.
It took us two weeks to experiment with the settings. In the end, we selected the minimum quality level that provides egg counting accuracy above 99.9%.

Fixed the lighting
The CamContador is not light demanding, but in some areas the cameras were shooting darkness. Somewhere in that darkness, eggs were moving on a conveyor belt. This caused errors in the counting.
We asked to add a light source so that we could see the products in the frame. You don’t need powerful spotlights to count products on a conveyor belt. It is enough for a human to see the products. If a human can, then the CamContador can do the same.


Identified and corrected the camera shift
In the first weeks of operation, discrepancies in egg counting appeared. It turned out that one battery had disappeared from the shot. Someone had hit the camera and it was shooting the other side. This caused some of the eggs not to be counted and the math didn’t add up. When the camera was corrected, the counting worked again.
On another similar project, the cameras were shooting products so fast that the counter could not react in time. Eggs were skipping so fast that the program simply didn’t see them. We asked for a different angle and then got a 100% accurate count.
No such problems occurred at this poultry farm. The customer initially complied with our recommendations on equipment and installation.
Javi Martínez, Project Manager
Detected a disconnection
In one of the workshops, we noticed frequent disconnections. They were short, literally a fraction of a second. The counter monitoring constantly sent error messages. Microdisconnects did not affect the accuracy of counting, but it was interesting to understand their cause.
It turned out that there are shops in the factory, from which the computer is half a kilometer or a kilometer away. That is, from the building where the batteries with the bird and video cameras work, the signal goes a kilometer along a fiber-optic cable. Therefore, the connection is sometimes lost.

In other shops with a stable connection, computers stand close, within 100-200 meters, and such disruptions do not occur.
Faced with a typical problem of poultry farms
At all the poultry farms we work with, sometimes there is a problem that cannot be solved. It does not depend on the qualification of specialists, the quality of video footage or the power of the computer. We honestly warn all customers about it.
Eggs cannot be counted correctly if they are riding on the conveyor belt in a slide.
When several eggs are piled on top of each other, even a human can’t realize how many eggs are underneath. The camera is also powerless in this case: it counts what it sees and will not be able to look under the egg.

Fortunately, this problem is rare. Clients realize that there is no getting away from it and it is easier to accept it. In addition, it has almost no effect on the overall accuracy of egg counting.
Results
At the time of writing, the video counter is in operation in 14 workshops. In addition to the egg counting, we have implemented the counting of poultry carcasses in different areas of the slaughterhouse.
The accuracy of the CamContador counter is between 99.90-99.93%.
The customer captures reports on the operation of the system in the form of a table. It shows the input and output flows, the number of eggs per battery, the percentage of accuracy and errors if any.

Due to the low cost and high accuracy of the video counter, the customer took a liking to it. Today, the company has 114 video cameras that capture 207 counting areas.
Our technology allows us to implement a product counter in every production area and see where losses are occurring. This is important to the management of the poultry farm.
In the future, the data collected will be consolidated into one database. The database will make it possible to make summary reports and build your own analytics.
Team. From our side the project is implemented by one specialist. On the customer’s side, one specialist is also involved in the project. He provides remote accesses, submits errors and monitors the operability of the cameras in the workshops.
Cost. 300 € for the first line (camera). 150 € for the each next line (camera). Sum total 1×300 + 113×150 = 17250 €.
Timeline. The launch of the CamContador video counter took one month.
It is gratifying that the company’s management takes the project so seriously. The client buys equipment in full compliance with our recommendations. Famous brands of components and video cameras, modern computers, top video cards, new generation processors, high-speed internet.
Thanks to this, the implementation of the egg counter is fast and the complex system with dozens of cameras works qualitatively and reliably.
Javi Martínez, Project Manager