How we took a sieve from a man and helped the mill

The benefits of AI (and all related technologies) are hard to overestimate. Properly trained neural networks can both foster interest in the technology itself, for example, by creating masks for social networks or generated songs in the style of your favorite artists, and show practical benefits in real cases - from predicting production events to finding missing people.

In this post, we’ll just talk about the practical application of AI in heavy industry (yes, we can not only do applications), namely, how technologies helped one ore processing plant significantly increase work efficiency and stop chasing people a couple of times in day sift pieces of rock through a large sieve.



In 1949, the Soviet exploration pilot Mikhail Surgutanov flew over one of the territories of Kazakhstan (Sarbay tract) and, looking at the compass, noticed that the arrow began to ignore the North and healed its life. Yes, like in a movie when some kind of magnetic anomaly is detected.

Actually, it was she who was confirmed by the geologists who arrived at the place. And then it was simple: since there is more iron ore deposit here, it is necessary to mine it. The result was the construction in 1957 of the Sokolovsko-Sarbaisky mining and processing plant . And so there was someone to work on it, at the same time built a city, which was called Rudny.

Today, about 115,000 people live in the city, and this is the largest production in Kazakhstan, it processes more than 40 million tons of iron ore per year.

Why ore needs to be ground to size


The very idea of ​​ore processing is to extract metal from it. In our case, the ore is iron and iron is obtained from it, for which they throw ore into the furnace and actively melt it. To feed the stove immediately a piece of ore the size of a refrigerator is an idea. The ore must be crushed. Therefore, after the initial crushing of the rock, the ore pieces are driven through a special mill, which gives the desired fraction at the output.

It was at this mill that we had the focus. Thanks to the guys from ERG (Eurasian Group) we got the opportunity to participate in this project from a software point of view and offer our solutions.

The efficiency of the mill is influenced by the following parameters: particle size distribution of the ore itself, water supply and the operating mode itself (supplied power, torque, etc.). The problem is that usually in production this kind of parameters (for example, the size of the input ore fragments) are exposed to the eye. That is, the employee takes a large sieve a couple of times a day and sifts the ore through it, and then on the basis of this sets up the mill.

image

For example, a specialist prescribed a mode of operation based on one gran. composition (respectively, one time) - and the mill will work precisely this time. If a person is reinsured with the calculations, then the mill will successfully grind everything, but for some time it will spin idle.

If you set the mill’s operating time less, then some pieces simply won’t grind to the required size, and you will have to start the process again. And every minute of the mill’s operation it’s electricity and water bills, not to mention the time spent in principle - you will have to reload the ore and update the mill’s settings. A day's work in this mode with repeated launches can be expensive for the plant, and if this situation has become the norm, then the annual financial losses will be very noticeable.

Therefore, determining the size of the ore on the conveyor is an important task, and we must do this as accurately as possible.

image

How was the work



We first sketched out several options, from x-ray analysis and lasers to a 3D model and the use of ultrasound, but decided to still use a system of cameras and computer vision capabilities: the quality is level, but the project resources are noticeably saved.

When you make a system that must visually evaluate some objects and divide them into “right” and “wrong”, you need to feed this “right” to the algorithm so that it has something to focus on. Based on the information from ERG, we registered the location of the equipment - where and what should be put, where are some covers, how to install video cameras and more. (But with the delivery of equipment, everything went not so promptly: the pilot came in May, so half of the counterparties switched to "Come on after May" mode).

image

Another thing is that the tape moves at a speed of 2 meters per second, so in some 50 seconds a piece of ore manages to pass the standard for a hundred meters.

It took us several weeks to set up cameras and collect photographs for training the model, during which time we managed to collect about 2000 suitable photos, and we began to lay out pictures in a semi-automatic mode. We shoot everything, by the way, on Basler industrial cameras with a shutter speed of 1 / 2000s, otherwise it is difficult to get adequate photos of small objects moving at high speed. In total, three such cameras were purchased, but so far two of them are working.


This is how the tape looks with the eyes of the camera

So, the stones that must be sent to the grinding mill, are considered pieces larger than 16 millimeters. Anything less is considered related garbage (sand, dust, other trifle). If a piece of ore is less than a 1 kopeck coin (it is 15.5 mm in diameter), this is by, and everything that is larger should be considered as a payload for the mill.


This is how the auto-marking algorithm sees the stones, described below

Process


image


image
, , 4 . 2 ( ), .

image

image


, 15 ( , , 16 , 16 20 , 15, ).

Then the algorithm converts this data into numerical metrics and calculates the area of ​​each piece of ore, which gives us average values ​​(the ratio of the pixel area of ​​the needed stones to the conveyor area), plus a floating average over neighboring frames is calculated.

But not a single photo, ERG colleagues gave us a lot of useful historical data for several years, with which it was possible to determine the percentage of fineness of ore fragments (granular composition and the proportion of large stones in the total mass). Video surveillance allows you to evaluate only the top layer of ore on the tape, so we predicted everything below it.

In general, we fed the algorithm photos of stones on a ribbon, marked images with stones larger than 16 mm, historical data from ERG and went to test. The output accuracy turned out to be about 80%, on a plant scale and in conveyor conditions, this is a good result. Using all this information, the algorithm determines the percentage of fineness of the ore pellets. And this is the very parameter from which they repel when setting up the mill.

How to train a neural network


The basis we have implemented on the Fast-SCNN network based on UNet, but not with so many parameters for training, plus there are layers to combat the effect of information loss at levels of strong dimensionality reduction and a number of other useful optimizations. One of the main features of such a network is the ability to adequately reduce the size of the output image by 8 times the height and width. Its authors believe that it is impractical to use images of more than 1024 pixels on the side, because both networks turn out to be of approximately the same quality, but the number of parameters for training differs by a couple of orders of magnitude.

We conducted several experiments and identified for ourselves the best model in terms of visualization, for verification of which we needed validation in terms of accuracy. To conduct it, we marked out several photos with our own hands in order to check how well the grid will recognize stones (obtained accuracy at the start of 55.3% in terms of pixels).

Here is an example of visualization.

  • Purple color indicates correctly recognized pixels of stones.
  • Blue - pixels of stones that the predictor recognized as a background.
  • And red - pixels of the background, which the predictor recognized as stones.






Draw conclusions, drove a few more workouts, bringing accuracy to 64.1%. It turned out like this already.





As you can see, the training turned out to be useful. Red areas indicating the number of errors were not marked during manual marking. Yes, stones could also be visible there, but their size would be much smaller than what we need. The idea was to not only reduce the number of incorrectly predicted areas (red pixels), but also increase the number of blue ones. The final metric takes into account the fact that the background pixels are much larger, so even a slight removal of the red areas does not increase the accuracy as much as the improved definition of the blue ones.

But it was necessary to slightly increase the markup. To do everything with your hands, of course, is good, but within a certain scale. Therefore, they launched semi-automatic marking with the help of additional tools, this is when in some places you sit and lay out manually, and in some places auto-selection of areas is involved. Here is an example of visualization: In



total, another 33 photographs were marked out, an additional training was conducted at 29, and then we checked the results on four images from the new batch and four from the previous one (which were manually marked). Here's the result: manual marking accuracy was 64.25%, semi-automatic accuracy - 62.7%. Here is the visualization.





They tried to replenish the semi-automatic markup further, but the quality did not increase significantly, so they began to consider this model as the final one within the pilot.

In business


Since the belt moves quickly and manages to transport a lot of stones in a minute, the ore weight data is updated once a second. It’s clear that when you have such data, you don’t really want to leave it somewhere in the flashing signs, and we made special dashboards for the employees of the plant with a visual representation of the process. You can track the overall results for the desired period, the dynamics of changes and other figures.



In July, we finished training the algorithm and setting up all the related processes, and in August we launched a full-fledged pilot on one of the pipelines. ERG after checking the models said that their accuracy reaches 98%.

We put the server for controlling cameras on the assembly line right at the plant: machine learning and computer vision are somewhat similar to Chrome, they will gladly “eat up” all the resources that you will have. Therefore, the plant, server, and video cards GeForce GTX 1080.

We made a web service on Docker, we put it in 5 images:

  • websocket-service. To add the ability of websocket to work with several artists, this is an intermediary between the websocket in the browser window and the db docker container.
  • data-service. A service for communicating with a camera, recognizing stones in images, obtaining metrics in terms of stones, contains a developed model.
  • front. Nginx proxies for accessing the system.
  • db. Image of access to the accumulated database.
  • front-service. The image of the web interface, as well as access to the API.


The result is just the right effect that AI and machine learning technologies should have on production processes - overall labor productivity increases, the influence of the human factor is leveled, more iron is extracted and, most importantly, the cost of manufacturing the final product is reduced.

The director of the metallurgy department told us that according to the results of 2020, using the model, it is planned to produce about 200,000 tons of finished products additionally, while the cost of production will fall by about 5%. Therefore, the guys from the plant plan to introduce this technology in all similar processes.

Well and yes, about standard horror stories in such posts. No one will go to fire a bunch of people after the introduction of machine technology. A good technician remains a good specialist after that.

And for workers who occasionally sifted ore through a sieve, you can simply find a more useful occupation at the plant.

All Articles