How Datarock is using PyTorch for more intelligent mining decision making

470次阅读
没有评论

https://medium.com/pytorch/how-datarock-is-using-pytorch-for-more-intelligent-decision-making-d5d1694ba170

Authors: Gerd WittchenDuy Tin Truong and Brenton Crawford

The mining industry is currently going through a digital revolution as it looks for new and innovative ways to explore and extract mineral resources. This has largely been driven by a need to reduce costs in a competitive global industry that’s experiencing declining ore grades and fewer new discoveries.

How Datarock is using PyTorch for more intelligent mining decision making

One of the most significant drivers to improving the efficiency and productivity of a mining operation is how well the geology is understood. Even small improvements in geological knowledge can have a significant impact on efficiency and productivity — and ultimately, profitability.

A key part of the mining and exploration process involves using diamond drilling to extract core samples — up to 2km beneath the earth’s surface — at different locations of a mine site. The cylindrical core samples extracted from the drilling process are then placed into trays for manual inspection by a geologist.

Centimetre by centimetre, a geologist will spend a significant amount of time inspecting these drill core samples. Geologists will look at rock type, along with mineralogy and structure, while engineers will look for features related to physical strength such as faults, fractures and rock quality. As you can imagine, these observations can be tedious, error-prone, and the conclusions highly subjective.

How Datarock is using PyTorch for more intelligent mining decision making
Cylindrical core samples extracted from the diamond drilling process

Applying image segmentation technology to drill core imagery

Mine sites often produce between 100 and 1000 metres of drill core per day — depending on how many drill rigs are concurrently operating — generating hundreds of images a week at a single drill site. Historically, these images have been kept as a record of the job and a resource for geologists to refer back to, rather than being used as a quantitative dataset that adds value to a mining operation.

Tapping into this rarely used data source of drill core imagery, DiUS — an Australian technology services organisation with a strong focus on machine learning and deep learning image segmentation analysis — joined forces with Solve Geosolutions — a mining focused data science and machine learning consultancy — to build a machine learning-powered, cloud-based platform to automate the analysis of this drill core imagery using image segmentation technology.

How Datarock is using PyTorch for more intelligent mining decision making

Together, DiUS and Solve Geosolutions worked on applying a range of PyTorch-based image analysis techniques, including image classification, object detection and both semantic and instance segmentation to a range of geological problems.

In particular, the team wanted to understand how different models performed in terms of training and inference speed, training requirements and overall accuracy of prediction to inform how they could be deployed in a production environment.

One model they have used extensively is Mask R-CNN. This model can be applied to a range of segmentation tasks, however it can also demand large training datasets that are sometimes not available. To support this, the team developed novel ways to increase the initial, often sparse training dataset through data augmentation techniques such as rotation, flipping, contrast, saturation, lighting and cropping.

Following the initial discovery period, the team set about combining techniques to create an image processing workflow for drill core imagery. This involved developing a series of deep learning models that could process raw images into a structured format and segment the important geological information.

How Datarock is using PyTorch for more intelligent mining decision making
Example rock segmentation and measurement used to produce rock quality designation RQD from core photographs. The model is trained to predict the boundaries of rock fragments and measure them (e.g. 4.7, 10.4 = 4.7 cm high and 10.4 cm long). Yellow colours represent rock fragments larger than 10 cm long, blue segments are less than 10 cm long.

Their first productionised process was a metric referred to as RQD — otherwise known as rock quality designation. RQD is a difficult and monotonous dataset to collect manually. It’s also well suited to automation and of high value to a mining operation. RQD is used by engineers to understand the strength of a rock and is used in the design and engineering of a mine.

With the release of Detectron2 — a PyTorch-based computer vision library released by Facebook in October 2019 — the team made the decision to switch from the previous model implementation on TensorFlow to the next-generation platform to help improve instance segmentation tasks.

The team found Detectron2 to be four times faster in training the models (using GPU’s) and three times faster in inference (using CPU’s) than the previous model implementation.

Building the models on PyTorch-based frameworks meant the team was able to reduce valuable training time across the board. This increased the number of experiments and as a consequence, improved model accuracy on an identical dataset. The PyTorch Dynamic Graph also made it much easier for the team to debug and investigate any issues that arose.

How Datarock is using PyTorch for more intelligent mining decision making

Changing the way mining companies approach data

Datarock is a SaaS offering that applies machine learning — image segmentation technologies — to drill core imagery and deliver information about a mineral deposit’s geology at scale, and at a resolution that’s not been previously economically viable.

Since launching Datarock in 2019, the team has extended the platform to turn drill core imagery into high quality datasets to support decision making throughout the entire mining cycle.

The models perform optical character recognition, instance and semantic segmentation, as well as geological statistical analysis on a dataset. This allows a geologist to inspect the model prediction and check for quantity and quality in unmatched datasets.

The Datarock platform is using React for the UI and AWS Lambda as the API layer. The data processing pipeline uses a mixture of node.js and Python libraries and functions to process the outputs obtained from the models built using PyTorch.

Continuous model improvements and new geological use cases require regular reprocessing of Datarock’s growing dataset. Therefore, it’s critical to strike a balance between performance — fast inference time — and processing cost.

Doubling down on large scale GPU Instances, Amazon SageMaker provides resource intensive and cost-effective model training. For model inference, the team leverages AWS Fargate to scale on demand. This architecture reduces the infrastructure costs for the processing pipelines used and helps scaling with ease with the growing customer base.

Datarock delivers faster results for more intelligent decision making

Mining and exploration companies can now get consistent geological information from their rock core imagery in a matter of minutes.

This near real-time power is enabling more intelligent decisions to be made further down the mining chain — saving time and money that can be put towards other business-critical projects — and freeing up geologists to do higher value tasks.

To date, the Datarock platform has processed more than 1 million metres of drill core images — that’s enough core to cover the distance between Sydney and Melbourne — over 800km.

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 
评论(没有评论)