Seismic Facies Classification with Deep Learning and Wavelets - MATLAB
Video Player is loading.
Current Time 0:00
Duration 54:28
Loaded: 0.30%
Stream Type LIVE
Remaining Time 54:28
 
1x
  • Chapters
  • descriptions off, selected
  • captions off, selected
  • en (Main), selected
    Video length is 54:28

    Seismic Facies Classification with Deep Learning and Wavelets

    Overview

    With the dramatic growth and complexity of seismic data, manual annotation of seismic facies has become a significant challenge. One of the challenges lies in classification where interfaces between different rock types inside the Earth are delineated in a seismic image – i.e. dividing the subsurface into regions that can be classified as distinct geologic facies. Delineating these facies requires months of efforts by geoscientists.

    Can AI algorithms solve this? Can they be trained to recognize distinct geologic facies in seismic images, producing an interpretation that could pass for that of an expert geologist, or be used as a starting point to speed up human interpretation? 

    In this presentation, we walk through how MathWorks helped solve this challenge and won the SEAM AI Applied Geoscience GPU Hackathon with a unique and innovative approach. We demonstrate the importance of applying signal processing techniques before applying AI algorithms. In addition, you will learn the following:

    1. How MATLAB simplifies the application of advanced techniques like wavelets through interactive apps.
    2. Creating Deep Learning models with just a few lines of MATLAB code
    3. Exploring a seismic volume with Volume Viewer App
    4. Accelerate algorithms on NVIDIA® GPUs or the cloud without specialized programming or extensive knowledge of IT infrastructure.

    About the Presenter

    Akhilesh Mishra is a Sr. Application Engineer at MathWorks. He specializes in the signal/data processing, artificial intelligence and GPU computing workflows. He has been with MathWorks since 2016. Akhilesh holds a M.S. degree from University of Kansas where he was the signal processing lead in a group working on radar and sonar systems for sounding the ice sheets of Greenland and Antarctica to study global sea-level rise.

    Recorded: 19 Oct 2021

    Right. Good afternoon, everybody. I think we could probably get started. Hopefully, people will join in the next few minutes or throughout the session. So firstly, thank you for joining us today, for joining MathWorks webinar. My name is Adam Knight. I work in the commercial team here in the UK.

    I currently support-- I manage, a lot, the relationships with some of our oil and gas and renewable energy customers. It's my pleasure to be co-hosting this session today with Akhilesh, who joins us from the US. Akhilesh, would you like to introduce yourself?

    Sure, Adam. And again, thank you, everybody. Thanks, Adam, for the introduction. So I'm Akhilesh. And I'm a senior application engineer with MathWorks. I've been with the company for almost five years now. And along with Adam, I do support oil and gas customers across the globe, and particularly with the challenges you guys face with AI signal processing and whatnot.

    So today, we're going to be giving a talk on one such solution. So we do develop solutions in the oil and gas space for you guys time-to-time. And once such solution we have developed for a seismic facies identification, which we'll going-- be learning today about. So over to you, Adam.

    Great. Yeah, thank you, Akhilesh. So you did a very good job there introducing the session. We would like to make the session interactive. We want you to get as much from the webinar as we do. So please do utilize the chat. Please do ask us questions in the Q&A.

    And please respond to the polls when they come up during the session. That would be very helpful. We're aware there's a lot of challenges with, yeah, managing and analyzing data, and huge amount of data that people are dealing with. So we hope that in this session today, you'll get a feel for how MathWorks workflows can help with some of these challenges.

    And along the way, we'll introduce you to new, and innovative, and, yeah, hopefully, world-leading techniques in AI, in signal processing, deep learning, yeah, parallel computing, et cetera. So please do make the most of this session. Ask us questions. And hopefully, you'll find some things that will benefit you in your day-to-day work. So that's enough for me. I'll monitor the chat and the questions. Akhilesh, over to you. Thank you.

    Thanks, Adam. And again, welcome, everybody. So let's-- without much delay, let's get started. Like Adam said, feel free to put your questions in the chat or the Q&A panel as we go along. I will be monitoring the chat. And we'll be happy to take your questions as they come along.

    So all right. So the facies identification problem. So I think you guys are more aware than I would be, probably, in this problem. So seismic surveys are done-- it's a very essential part in the oil and gas industry, where to drill, where-- surveying all the sites.

    So there are usually two types of surveys which we do, one on the land and the other one over the sea, which is called subsurface. And essentially, doing the surveys, the remote sensing process, we're just trying to find-- send out sound waves below the Earth, and then get the reflections back, and then create an image of the Earth subsurface, and find out what are the different layers, what they represent. And then where is the oil where the companies should go out for drilling and whatnot?

    So a couple of insights in this process. This whole seismic interpretation, once we collect the data, the layers do look differently, have a different contrast. Because the impedance of the layers or the rocks' features below the Earth, it creates that contrast for us. And the quantitative interpretation does allow this characterization of the reservoir and different reservoir types.

    So now if you go in, the whole signal processing pipeline on the data, how it's sent, it's received, it's processed, all this from getting those sound waves to convert into something like a final image, it takes a very, very long time. And amount of the surveys done out there in the field is quite extensive too. So it's lots of data, which is across several hundred and thousand squares of kilometers, which needs to be processed. So it sometimes-- even-- it would-- can take years to-- before we can get the actual final image from one of the survey sites.

    Now the seismic interpretation is another big, challenging problem in this one, where the geologists have to go in. And the data looks something what I have over here on the top. And the experts and the geologists have to go in and label each of those regions manually. And that is a very, very cumbersome process. And it is very essential, like I said before, to characterize that as a And it is one of an upheaval of end task.

    The other challenge with this, normally, the time constraint with doing that several hundred kilometers of labeling. But then also, it's-- one interpreter can I have a slightly different result from a different interpreter. And that reproducibility would also be a challenge. And then the other part, it challenges the interpretative. So how do we interpret it? Sometimes, what's the accuracy? What's-- if we identify a certain region, is it accurately labeled or not, is another big challenge in this front.

    So that brings us to the current era, where we are. Until now, what I've been just saying, it's been done over the years, maybe past 50 years or so. But this brings us to what we are in today, where a constant push has been made towards adopting AI as a solution for doing that seismic facies classification.

    Now if you go to the literature, these are some papers I just-- the ones which are widely referenced. So you'll find, these days, people are coming with lots and lots of different types of algorithms which uses deep learning networks under the hood or maybe a machine learning network.

    And they're doing-- moving towards a format where it does the automatic interpretation of those seismic features. So if you see, this is some results from the Google Scholar, which I got. Seismic facies classifications, I think there's 500k, 500,000 citations already. And then machine learning and facies classification is already 33,000 certification.

    So now when I read the literature survey, and what I found there was a common pattern in all the literature out there so far. The common pattern is, in the deep learning world, one network, which was extend one type of network-- rather, I should say, what was extensively used-- is the convolutional neural networks. And those are the networks which take in an image and then spit out an output, which is a classification output.

    So convolutional neural networks, like the types which have been most referenced, are like the UNet, the VGG net. And a couple more, actually, from the semantic segmentation standpoint. And what these networks do, without going in too much detail or deep learning-- please do reach out to us if you want to learn more about deep learning in a little bit more detail. I'm just doing-- speaking from an application level at this point.

    But what these networks do is-- I have one of these deep learning networks on the right side over here. And what these networks do is they take in an image of certain size. So in this case, this small segment is of size 480 by 640 by 3. And then all these different layers do perform the operation like convolutional operations, ReLU operations, and all sorts of filtering and feature classification.

    Until we reach towards the end-- oops-- where based on the different number of classes in that image segment, we'll get a score for all of those classes for every pixel in that image. So our output size would also be off 480 by 640. But instead of by 3, it's going to be the number of classes, what we're trying to classify.

    So not going in too much detail, again. But to give you a little bit more idea from the challenges perspective. So an input image can look something like this. The by 3 dimension in the end is for RGB. But if it's a grayscale image, it would be only by 1. But then this is how the outputs or that facies classifier would look like. And the labels would be corresponding-- every pixel is corresponding to the pixel which it's throwing in our input image.

    Now the challenges with this approach. So this is the most common approach, what we call a semantic segmentation with deep learning. And the networks used under the hood are the CNN networks, or the convolutional neural networks. But now this has its own challenges.

    Now I'll mention a few challenges. And I would like to point out why this technique has not been put to full-time production just yet. So the challenges with this is, first of all, the overall accuracy of the networks is a little bit less. We do want a certain robust network which will perform in all possible scenarios. And it shouldn't be a trainer network in let's say, one region in one part of the world.

    In these days, we are-- I read an article. We are surveying the ocean region around Greenland, for instance, in the Nordic. And up there in Greenland, let's say we train a model which is classifying on the east coast of Greenland. Then the same model, ideally, should classify even for my surveys in the west coast of Greenland. But that doesn't happen, really, with this method. Because there is some level of overfitting happening in this approach.

    Now input image size does greatly impact those prediction results. The larger image has a better performance. But then how much we can load the network in one go is a limitation at all times. So what people do is, usually, they divide their big data sets from one survey region in small, small, small tiles, something of this fashion-- this is one of the papers I took these pictures from.

    So in this case, 80 by 120 or 128 by 128. And these small tiles are fed into that network for the training and the learning process. So it is a limitation caused by how much data can accommodate at one go inside the deep learning network. So now one big limitation I see is, so this tile structure, it does not do a good job. Because our data is very continuous.

    And if we start feeding those tiles, it might be the labels are not-- they do not appear continuous. So this tile output is this. This tile output is this. But if we combine these two tiles together, it might not be very continuous. And it doesn't look real, to be honest.

    So one of the biggest things which I see is-- or biggest potential, what I see in this whole process is that we are training everything from images, CNN's. But underlying data is all signals. Because remember, it was all those sound waves which are being sent down to Earth and then reflections being received back.

    So why don't we-- and this is what it looks like. So these are-- if I see each of those columns in my image-- let me just go back. So if I just have to see these columns in my image, then they are actually nothing but their signals. These are 1D signals. Or they call it the seismic short sometimes, and then also called seismic trace.

    And these signals have these different impedences, characteristic return amplitudes, if you will, which is distinguishing for each of those layers. And that's why the layers look distinct. And this is what the idea is. So now this is a disproportionate image over here. But something, this is how it would look like.

    So for all these columns, you can see that there are some distinguishing features in the signals itself. This region from this region has some change in the frequency over here. And this region to this region has some change in the frequency over here. And this region to this region has some change in the frequency here and so forth.

    So these are very small time-- if I see my depth as my time axis, so in time, these frequency changes are very short duration. But they are very significant. And if-- the idea is if we can leverage the information from those amplitude and the frequency changes of the signals, we might be able to come up with a more accurate model.

    And that's exactly what we did at MathWorks. Now we did it as a part of one of the competitions we participated in, which is called a SEAM AI. And this is one of the competitions for-- organized by NVIDIA author. But we had this very HACA data set from New Zealand survey. And they gave us this 3D raw data set. And they asked us to build some high-accuracy models to implement the entire pixel-by-pixel classification.

    So what we did at MathWorks is-- and this is what I'm going to present a little bit more in detail and show it to you live as well-- is we embraced the existing work, which has already been done using CNNs. So that's our step two. So what we did is, we'll-- we also train a TS-- a CNN model. The 3D data will convert it into 2D slices.

    And just like what has been done, we said that we'll split it up in 256 by 256 size patches, and then train a UNet to do the semantic segmentation. So that's a well-established technique. But in addition to that, we have a number one strategy as well, which is, we'll also train a model from signals.

    And what we did is-- now what we did is, we applied some signal processing. And I will tell you why we had to do that. But we have these signals in the Z-direction. The length of that one seismic trace is 1,006. And what we take is that 1,006 signal. And then we train what we call a deep learning as recurrent neural networks to do the classification one sample at a time.

    So you can think about it as one signal going in the deep learning network. And for every sample, one of each signal, we're getting a classification output. So now we're not labeling anything from an image perspective. But from the signal features labeling each-- corresponding to each sample, we're getting one of the label sets.

    So that's what we implemented. And then what we did towards the end is we combined both these models, the RNN approach and CNN approach together, and then had another polling algorithm, which I'll talk to-- about a little bit, but-- to summarize the final results. But let's go in the details of the RNN at this point. And I will show you to do it live in MATLAB, as well how we did it, first thing.

    So having said that, folks, again, just a reminder. If there are any questions at this stage, please do feel free to put them in chat and Q&A, like I said before. I am monitoring the panel right now as well while talking. So I'll be happy to answer questions as we go. Or if anybody would like to share any thoughts or challenges, what you might have faced for your AI problem, I'll be happy to learn about that as well, if you'd like to share it with everyone.

    All right. So let's take a look at this RNN approach. Now for the RNN approach, again, without getting into deep learning just yet too much. But one of the things was, OK, the easy approach is we take the signals. We have all these signals. We build a deep learning network. And we try to train the network and then hope that our classification would work.

    Now coming up with the network design is a whole another topic for another day. But obviously, as-- there's-- we can iterate through the different designs. Otherwise, there's, again, a lot of information on the internet which we can use as a starting point. Although, not much information for seismic with signals. If you search the literature, you might not find too much details in it. But still, the deep learning has been applied for different signals-related problem. And we can use that as a starting point.

    But in this case, I have an input layer. And then the final is a classification layer. Like all these traces, I'm hoping it will give me the classification output. But-- I'm sorry. The-- from the input players, we can get the classification output, which we've constructed over here.

    But when we do the training, just with the raw signals, what happens is, there's-- these signals are so rapidly changing with time. And also, one signal is so different from the other signals back-to-back that the deep learning network, if you perform the training, it never learns. And it-- this is one of the sample learning curves where top is the accuracy we want, 100% accuracy. And the loss function should minimize. And-- but it just never learns it.

    And if we were to see what-- we call it a confusion matrix. If, let's say, we have six different classes in these signals, then this is what the confusion matrix looks like. And it is actually horrible. It's not doing anything at all. So it's a very poor classifier. And it does not do the job. So this is where the multi-resolution analysis comes in. And this is where the signal preprocessing techniques comes in.

    So I will take a pause. I do see some questions coming up. So let me answer those questions first. So-- and, folks, unfortunately, I cannot see the chat. So I would encourage to put your questions in the Q&A panel so that I can answer them. It's probably something with Webex. Unfortunately, I'm unable to see the chat at my end. So please put all your questions in the Q&A panel if you do not mind. So I see a couple of questions in the Q&A panel. And let me just see this.

    Do you want me to read them out to you, Akhilesh?

    Oh, that would be wonderful.

    Yeah, perfect.

    Unfortunately, I can't see it.

    No problem. So it looks like the first one is, can you elaborate on the mechanism used to combine the CNN and RNN results?

    Yes. Great question. So I would get into the details just in a-- towards the end of the talk. But we did use another machine learning algorithm to do that polling or to answer the question. And then I'll show you towards the end how it's done.

    Great stuff. So the second question, just while we're taking these, a challenge is traditional seismic facies classification is the number of facies that we aim to identify. How do we do that so that the-- I'm probably pronouncing this wrong-- the seismic facies stays connected to geology instead of becoming nongeological attribute?

    So thanks for asking that question, Preshon. This is-- this definitely is a very relevant question. And I think it's got a broader answer than I can just answer in a few lines. But it really depends upon how we formulate our problem. And just in a minute or two, we'll go to the code.

    And you'll see that, in my case, I'm taking the full signal together for my classification. And that's why, at all times, my-- the seismic facies does get connected to the geology. But you're right. Sometimes, it can go astray, which we do not want. And there are different strategies to do that. I think it involves a little deeper discussion. So I'll hold it off for now. But you'll see how-- the way we have implemented for this challenge.

    And final one for now. Can wavelet approaches be used for very high sampling frequency, like 44k, for example?

    Yes. So this is a great question. The answer is yes. Sampling frequency is-- for whatever sampling frequency, wavelets can be used. Actually, in signal processing, sampling frequency, the role the sampling frequency will play is what I will show on the screen right now, how we split it up. And then it depends upon which frequencies your signals of interests lie. Sometimes, you'll have to play around or-- to figure out those levels. But to answer your question, yes, it can.

    Great stuff. I think that's all for now.

    Guys, thank you very much. Thanks for putting in the questions. Please put it in the Q&A panel. That's-- this is a great question. So to answer the-- going back to the sampling frequency question right now. So the problem, this would be answered on this slide, actually. So the problem, like what I said, was the raw signals were not learning.

    But then this is where we start using more techniques for signal preprocessing and extracting those subtle features, which I just pointed out, for all the different facies. So one of the techniques which we use is called multiresolution analysis. And wavelets is the underlying basis to implement that multiresolution analysis.

    So what is being done over here, let me just describe this. So what we do is, using wavelets-- now wavelets has been used for seismic signal processing since ages. As a matter of fact, seismic community developed the wavelets as well. So wavelets is an excellent fit in seismic signal any given day.

    Now what happens in this process is we use wavelets under the hood and split the signals into multiple sub-bands. And the splitting happens in the fashion which I have on the screen over here. So depending upon the sampling frequency-- this is where the sampling frequency comes in-- the higher band is the-- let's say your sampling frequency is Fs. Then the upper band, the level one, is always Fs over 4 to Fs over 2. But then the lower band is Fs 0 to Fs over 2-- Fs over 4.

    Then you can split that lower band into further sub-bands, which would be Fs over 8 to Fs over 4, and 0 to Fs over 4, and then so forth, Fs over 16, Fs by 32, Fs by 64, and so forth. You can keep splitting it into discrete, discrete, discrete levels. Now this is the multiresolution technique which I used.

    But then there's another technique. If you want to split the upper bands, then you can use what we call as Wavelet Packet Transform. But in this case, we did not have to do that multiresolution with them. This technique is called Multiresolution Analysis with Maximal Overlap Discrete Wavelet Transform. That's the full term.

    But without worrying about too much details, again, the idea behind this is if there is a way we can split the signal-- and we saw that the signal has different signatures for all those different facies-- in some sub-bands, such that we capture those facies, we might be able to get away with. And then train that in the deep learning network, we might be able to get away with a better accuracy.

    So probably, this is a good point. I'll switch to MATLAB. But this is the first thing which we do. And then we went into the MATLAB to do our training at that point. So I think this is a good point to transition to MATLAB. Because I do want to show you that-- this process being done in MATLAB instead of just going over the slides.

    But this is where we start. So we will take in the data. We'll convert it into a multiresolution analysis sub-bands channels, all that data. And then take that data into-- feed it into a deep learning network. We will actually construct a deep learning network and then feed that data into the deep learning network to do the training.

    So in this case, I already have the data loaded. And by the way, if you are working with this data set which was provided, it was an SEG-Y, SEG-Y file format. And if you would like to know, how do you open-- import SEG-Y file in MATLAB, here's a link. Maybe, I'll put it somewhere in the chat.

    But we have provided this SEG-Y file reader function, which you can reuse at any time to bring the data in MATLAB. So I will provide the link to this. I would provide the link to this in the session. But that's what we use to convert that SEG-Y file into a MATLAB file.

    And when we load this data, we already have the data and the labels. So the first thing I want to show you is if you just want to visualize this data and the labels, we have these apps for 3D data visualization. If you scroll down on the Apps menu, you will find it over here in the Image Processing and the Computer Vision section, which is called the Volume Segmenter.

    And this is the app I've opened over here. And what you see is I have plotted my data. Actually, let me just first do this. So this is the data. And overlaying the data, I have overlaid my labels on it. And my 2D-- 3D data is represented as 2D slices over here. So I can scroll and take a look at it.

    So this data has got 780 by 590 X and Y grid locations, or 780 times 590 X and Y signals, if you will. And the length of the signals in the depth is 1,006. So that's the dimension we're working with. And I-- if I recollect correctly, then it's probably a survey worth of 45 by 70 kilometers or something on those lines. I'm forgetting the area of disarray.

    But this is the labeled data set. And you can see I can operate on the-- whichever slice I would like to, and to see this data set. And now you can see that there's some faults also, which is a part of this data set. So this is preprocessed labels. But now I'm going to leverage this data plus this labels information to build a classifier.

    So the data is over here. Like I said, it is 780 by 590. And 1,006 is my depth. And then my label for this is over here, which is the same size. And this is-- I already know this. So I will build up on top of the classifier. So I would not run the full data. Now this is another thing I want to highlight. With MATLAB, you do have the features of-- for big data processing. We can easily scale our processes on the GPUs.

    And if you also want to leverage some cloud computing resources for parallelization, MATLAB has a direct support to-- with a bunch of cloud, like AWS or the Azure. And then we also support NVIDIA's own NGC container if you would like to leverage this. So all the work which I'm showing today actually was done on the AWS cloud machine, which has NVIDIA Ampere A100 GPUs, which are the very powerful ones. And then we were able to process a large volume of data in that case.

    But for the demo purposes right now, I'll only-- instead of taking the 782 by 590 and processing it full, I'll just take a small chunk of it for demonstration purposes. All right. So now we have the data. And then the next step is to extract that five different multiresolution layers.

    Now I do want to take a moment here to introduce this-- another app. And it's not only helpful for the facies identification, but then it's also helpful for other signals, or maybe well logs, or other sensor data you might be working with. It's a very powerful feature. So I do want to introduce this to you.

    So this app is called this Signal Multiresolution Analysis app. And if you have the Wavelet toolbox, you will find this app. And what I'll do over here is, maybe I'll just separate out one trace. I'll call it x and show you how it's done. So I'll just say that the x is maybe number one, just one of the traces.

    So now I can go to this multiresolution. I'll just import one of the signals for doing my analysis. Actually-- all right. If it's taking a while, we can get back to it later. But the function, you saw the app. I will show in a bit, maybe, if it gets started. But the code to do that is only one line of code. So everything I told about the wavelet multiresolution analysis to extract the signal, all I do is call this modwt function.

    And I can specify in the app-- actually, it allows me to specify which wavelet I want to choose. And then based on that wavelet, I can work with it. Whichever the wavelet works the best to extract the features, I can use that. But in this case, the last time when I did it is, I used fk14. And I divided into the four levels. And the fifth level is approximate. So it's usually five channels. And that constructs my data over here.

    Now I'm still hoping this starts. I'm not sure why it's taking a lot of time. But that being said, so now at this stage, what I have here is I've compared this-- I've got this data set. Now each of the signals at this point-- once we have this implemented, each of the signals are split into five channels. So if I have to show you what the dataMRA looks like, the multiresolution analysis data.

    And if you see over here, so all my signals, 1,006, 782 by 590, now for all the signals, I have this, extra five elements, which are my five channels, which the signals have been decomposed into. And this is where I-- instead of working with all the data, what I do is I just work with the-- no, I'll just do it again.

    So I'll just rerun this. Because instead of running for an entire data set, what I'll do is I will just run it for short samples, 50 samples, a part of that entire big data set instead of that entire 3D volume, for demonstration purposes. But one of the things I like to point out is going back to the speeding up on the parallel computing.

    So if you see over here, I have got something-- what we call as parfor loops. So anything which we have to do in a loop, we can easily-- we can scale it up. And let's say we have multiple workers. And in this case, I've got eight workers on my machine, eight cores. So I can use that very easily. And if I'm doing it on the cloud, it can be 100 cores or 200 cores and a lot more.

    And if you want to scale it on a cluster, that's an option too. But once I have that, let's do this again. So this is what the app looks like. Although it was not opening, I have restarted that process. But what this app allows you to do over here is, very quickly, you can choose the different wavelets.

    And that's what I wanted to highlight when you're splitting the signal. And choose the different wavelets, fk or same, depending upon what signals we're working with. If you already have some insights, which wavelet you want to choose. But then you can try out and just hit Decompose it, which immediately decomposes your original signals in that subsequent sub-bands.

    You can decide upon the different levels. You can increase the number of levels if you want more granularity. Or you can keep it as is. So for us, the five-level worked the best. And that's what we decomposed into. This is the entire layout of the app. And these five signals, these sub-bands, which-- so this is the original signal, by the way.

    On the right side, the five sub-bands which we decomposed, you can export it out and as a script. And the script would look like what we had in that code, like that modwt function. So it gives you an automated way of analyzing the signals. And you can import in any other signal as well and do that analysis.

    Now once you've done the analysis, what we did is we did a little bit more tweaks to it. And I'll try to jump back to the MATLAB just in a bit. Hopefully, it does restart. But what I do is I take that-- instead of taking one signal by five channels, just to have some more spatial correlation in the X, Y direction, we took-- instead of one signal at a time, we took 3 by 3 grid. And 3 by 3 grid to just establish that correlation of the neighboring traces.

    And then when we do that 3 by 3 grid, take that data and group it together. So this is what the data would eventually look like, 1,006 by 3 by 3 by 5. And that's what we feed into our deep learning network for training. Now the deep learning network which we constructed is what is over here. This is exact network, what we constructed.

    And what we are doing is, this 3 by 3 by 5 constitutes our 45 samples. And we are feeding 45 samples at a time. And then we are gradually going down in the-- using the LSTM layers, which allows us to feed in the time series input. And this 1,006 is our depth information. And 45, 45, the group of 45 signals we're feeding in the network at a time. And we're gradually going down all the way till 1,006.

    And in this data, we had six different classes, or six different facies. And that's why our classification layer is size 6. And that's the output we will-- this network is going to go out. So long story short, the network takes in 45 samples at one time and then spits out a vector of size 1 by 6, which has the score of all the six classes, the 45, 45, 45 each time. So for the end user, we are going to feed in the traces coming from the top all the way till the bottom.

    And when we perform the training-- and I'll share the script just in a bit-- it's a very lightweight script. We did see that it went up to the 90% or 95%. So this is-- when we do on the validation data, this is what it looks like, the results. So the actual labels and the predictive labels were quite consistent. It was a 90% plus accuracy.

    But interesting thing to note over here is even these layers where it's the very small regions, these yellow ones are being picked out. Now this is the coarse result, which can be smoothed out further just by doing some averaging or a moving average filter on the image.

    But the labels were pretty consistent. And even in this one, if you see, there's some feature over here which is being recognized a little bit. And mind you, in this process, it is not even clear if all these labels are also accurate or not. So sometimes, the deep learning network can give an additional insight. Because now we're talking at signal's level. So there might be some features actually present over here which can be relooked at.

    Now with that, let me jump, again, back to MATLAB. Because I do want to show you-- I'll skip over the app for the wavelets piece. But let me show you what I've done over here for the deep learning piece. So once I have the data and I rearrange it to represent my 1,006 by 45-- so if you were to look at that data-- I'll just show it to you. So you'll see this 45 by 1,006. So that's my 3 by 3 by 5 group. That's 45 by 1,006 is my depth.

    And I've rearranged all the different traces accordingly for my training data set. And what I do over here is-- if you take a look is-- I randomly divide 70% for training, 1% for validation, and another 1% for test. So I'm splitting that data, the same data set for training, test, and validation.

    And this is the part where I construct the RNN network. So if you see, it's a very simple code. Input size 45 is being used here. There's iLSTM layers being used. And then specify the hidden UNet size. Now you can do all of this in the command line. But for constructing layer, especially if you're doing the first time, we do have an app for doing that as well. And it makes the life of so many people so easy. Believe me or not, but I think this is a far-- by far, a very popular app these days.

    So this is called a deep network designer app. And what this allows you to do is, right now, it is a simple network. But sometimes, we have really huge networks. But I do want to show you this app. Hopefully, it works. Not sure why my network-- MATLAB took a stall a while back. But I'm pretty sure it's going to work right now.

    So the deep network designed app gives you this nice canvas of constructing your deep network layers. And if you're starting from a pre-existing network, which we call as a transfer learning approach, then it also gives you the library of networks which is already pretrained.

    So if you want to load in some of these networks, which you might already have, there's a big library of networks which can already be loaded. But in this, also, there's some sequence networks. So you can use them as an example. That's what I'm doing in my case.

    But I'll just start with a blank network. And this canvas is a very handy tool to design the network. So I know that my network-- I start with the input layer. And in this case, I have a sequence input layer. Because one sequence at a time. And I drag and drop this. You can put in that value, 45.

    And then the second layer, I know, is my LSTM layer. So in the sequence classification layer, you have so many different layers. I tried it with gru layers first, but then ended up using a bilstmLayer because of better performance. You can start connecting them together.

    And the number of hidden UNets does play a pivotal role in the classification accuracy. So that needed some experimentation and tuning. But eventually, 50 worked well. So forth, you can start putting in more layers, like a layerNormalizationLayer. Then I have another bilstmLayer. This whole library gives you a very easy interface to construct all of this.

    And maybe, towards the end, I have a softmaxLayer, a classificationLayer, and then our fully connected layer for converting all that depths into my-- something meaningful. So I just constructed-- that's something hypothetically over here, not the full network.

    But-- now once you have constructed this, this does allow you to do some analysis if you would like to check the network. And you can make sure that the network, what you've designed, is accurate. And obviously, right now, my input is correct. But my output is fully connected with 10 classes. So maybe, I need to go ahead and change this to 6. And then do analysis again.

    And you can iterate back and forth to make sure that the network has no errors, no warnings. And once you've done that, this is where you can export it out and generate the code from this. And this is the code which I have over here for the layers. It automatically generates. And that's what I'm using in this piece over here as well.

    Now additional thing is, I would like to point out for more advanced users out there is what I have done over here is I also added some weighting to the classes. Now in my six seismic regions, like all these six labels, apparently, the region number 5 and region number 6 has had some more weightage. Or it's the more important layers versus the feature number 1, 2, 3, 4.

    So what we did is for feature 5, like these green regions over here, for these small green regions over here and then this blue region over here, we added additional weight. So we said that 5 and 6 could be of weightage 8. So that a network learns accordingly and then has more emphasis on one facies versus the other facies. So if there's someplace you want to emphasize, you can definitely go about that.

    Now the next step is, now once you've constructed the deep learning network, all you need to do is perform the training. And this is what is done over here. So I do give some training options. And for those of you who might not be familiar with deep learning just under the hood, it's still an optimization problem.

    When I constructed this deep learning network, so all these layers have these weights, and biases, and these parameters which are learnable. So if you see this matrix, 400 by 45 weights, RecurrentWeights 400 by 50, by default, all of these weights in an empty network is actually empty. And when we do the training, it would put those numerical values in these weights of all the different layers, such that my classification output means something.

    So that's where we specify what solver I want to use for the optimization. In this case, I'm using an adam solver and then a few other parameters, which are called the hyperparameters. And once you've defined that, all you need to do is call this trainNetwork command with your data, with your actual labels.

    What is my layers? This is my lstmNet. And then my training options. And that's about it. So literally, in this code and this code, you do lines of one for defining the layers, one for defining trainingOptions. And then you can go ahead and train your network. And remember, I'm training in a very small subset data set.

    Because even with this 50 by 50, you can see that my-- if I show you my trainData, I've got-- the way I've formulated my problem, I've got 1,614, 49 by-- 45 by 1,600 is each of my data set. But then there are 16, 14 traces which I'm using to train. So the-- before we realized, basically, long story short, data can explode.

    And now this is the training which is happening in the background. And also, in the meantime, while this training is happening and my network is learning, you'll see that with that small data set, very quickly, the network does learn. And it's almost getting an accuracy above 90%.

    So while this is training, I do want to call out, there's actually a poll which is open right now. And if you guys can take out a minute to fill out that poll, I would really appreciate it, just for-- you might have seen a poll coming up as a pop-up. So just take a minute or two to fill out the pool.

    It will be available till the end of the talk, end of the hour. So just for understanding where you're at with the process of implementing deep learning AI or if you need any help from us, we'll be happy to connect with you. So please do fill out the poll. I would really appreciate it.

    And we can see over here that this network is almost reaching 100% accuracy. But this won't be a robust network. Because it's being trained on a small data set. And if we train on the bigger data set, it takes a very long time. Right now, I'm on a powerful GPU machine. It's got a voltage GPU. But even on that, it takes almost seven to eight hours to train for the complete data set. So it can be a little bit long.

    But over here with the small data set, the training is complete. And now my netLSTM, if you would like to see, just in case. This is my netLSTM, which is my output network. And if you'll see in that, then all those learnables will have values to it. So if you want to see-- this is the learnable.

    RecurrentWeights of this network, now you'll see all those numeric values which is learned during the learning process, essentially. All right. So that being said, now once you have the learned network, you can throw in that-- remember, I saved out some test data set. I can just call the classified command on the testData set and get-- there we go.

    So just right now, what I did is testData set, which I separated it out just for testing, pulled out some data. You'll see that it is performing really well. And this screenshot I have from the entire data set from the past. So you'll see that this represents my percentage. And you can see that all my classes are 90% plus accurate for the test data set, which is fantastic.

    So last but not the least, now once you've come to this point, what you can do is, you can actually-- now if I have to run this whole function, now I have the deep learning network. I know exactly what works. And I got a good accuracy. So I'm ready to go to the next phase, which is my deployment phase.

    So what I can do is I can put this whole process in production. And that's another support which MathWorks offers, is that you can put your classification routine in a function, what I have done over here. So this is a function which takes in some input data. And in this one, we're going to do the same thing. We are going to extract the multiresolution five channels from that input data.

    We are loading a pretrained deep learning network this time. We are reorganizing the data. And again, that 1,006 by 3 by 3 by 5 set-up, which is over here. And we run the classified command on the train network for that data and then get the labels. And then we rearrange the labels in the output format. So it's a function, which is a black box function you can think of. And I can have something like, testData is equal to-- I can just take part of that. Except-- I'll just, again, take 51 by 51 samples.

    And I can call this function as a black box, such that it is my function which takes in the data, which is of size-- whatever size. Let's say the data is actually coming from field. And then it takes in that data, and then classify-- runs the classification routine on it and gives me the labeled output.

    So let me just try it one more time. So I need to give 51 samples. So I just give 1 to 51 or something like this. Just, again, it's some dummy data right now. From the original data set, I'm just extracting a small piece of it, thinking that is a testData. And then we can run this RNNClassificationTesting function and get my outputs, which can be viewed so that we have another app, our 3D Volume Viewer app.

    And in this case, I'm opening the labels with-- along with-- you can see the 3D volume with the labels. Or you can also see the 2D slices as well. So this apps provides you this nice little interface to do that. So you can see that even for the small data set-- I'll actually go to this.

    This is a very small data set. That's why it's looking like this. But let's try to get it right. There we go. So this is the one small volume piece. But you can see that the labels, even with that small data set, it's coming out more or less-- it looks more or less good. Not fully accurate, but still a good starting point, at least.

    So this is a volume we have for you guys. But now the additional thing which I wanted to tell you, this function which I've written, now you don't have to restrict yourself in MATLAB. What you can do is-- I'll just go back to the slide again. This function is actually deployable. And you can take this function and convert it into-- I'll just go back.

    And then I'll quickly-- you can convert that to a particular function and deploy it on an ARM-based processor. We do support deep learning for GPU libraries. You can deploy it on an NVIDIA edge device. And then you can also even generate-- we do support deep learning for FPGAs like F code, which runs on the FPGA.

    So that function in itself, with that doing that preprocessing data rearrangement, calling that deep learning layers, can be deployed in real-time on an edge target. But then you can also deploy it on a-- more like an enterprise level. Let's say your team wants to build some automatic calculator which does that seismic labeling.

    So you can deploy it on your internal company server, and such that the end user needs to just point it to the data set. You can build an app out of it. And that background process will run on the powerful machines which you have. But the end user can throw in the input data, get the output, and then get done with it. So you can have that enterprise level of deployment as well.

    All right. So that being said, that's where you can take this. I just want to quickly complete this. The second approach was the UNet approach. I won't go into too much details. But again, with MATLAB, it was done end-to-end. And the idea is with image approach, we use 256 by 256 slices of that entire image, something of this format, and then trained a UNet

    And we have a direct support of UNet just like with the deep learning, what we did with the-- a deep learning with RNNs. We constructed the network. You can directly call the UNet command. And then UNet is one of the very popular networks used in the biomedical community for doing segmentation. But it's heavily used in the seismic industry as well.

    So we do support this. I'll just show you this. You can do a UNet layer in MATLAB. There's a direct function which would import in the UNet layers. And once you call those layers, it's a pretty dense network. But you can adapt it to your problem. And we can share the code on how to do that too.

    But going to the last part. So I won't go in the detail in the interest of time with the UNet piece. But once you combine-- the way to combine the prediction-- so we have unit predictions. So now we have three predictions from these three-- from those two algorithms.

    So three predictions are then-- we got 2D predictions from the XZ plane for UNet. We got 2D predictions for YZ plane from unit, which is the same unit, by the way. And then for each of those traces, we've got the Z trace, which we got the RNN prediction. And with those predictions, what we have is, we've got score for all those six classes.

    And then we have a pooling algorithm in place, which is actually a machine learning model under the hood, which picks out, what could be the possible score for each class? What is the maximum representation? And that's how we get the final prediction in the Z trace. And we run it for the entire data set. And all on the GPU, again. Because it is a compute intensive process.

    So this is our final-- the actual label, the RNN label, UNet label. And then we combine them together to get our final label. And that's when we had this 93% plus accuracy on the data set. And like I said, again, we were using the MATLAB reference architecture on AWS. I've given a link in case you're interested.

    But I do want to mention this, that in that competition which we are participating in, we actually-- our weighted score was highest. So we have other teams. I have grayed out the names of the teams for privacy reasons. But you can see that our weighted average score for the classification was 76.76.

    Versus other teams were at 0.39, 0.35, and so forth. So our accuracy was more than double than the other teams could provide. And these are all big players in the oil and gas space. So this novel technique with RNN was the key for getting this higher accuracy.

    So I know I'm at the end of the hour. I would like to conclude it with one final thing. And if there are more questions, I can take it right now. Please do put it in the Q&A right now. But one final thing. We do have trainings on both wavelets as well as deep learning. So if you're interested, we'll be more than happy to-- I'll share the slide after the talk.

    We can sign you up for the trainings. We have a full one-day training on wavelets course, how to use it for your seismic as well as signal processing applications. And then we also have a deep learning training, both machine learning as well as deep learning training. It's a two-day course, which we can help you with.

    So with that, I'll conclude the talk. Thank you very much. This is me, Akhilesh, over here. Feel free to add me on LinkedIn. I know it was a little bit of glitch in the middle. But hopefully, you'll get the slides and the code. And then-- and you can reach out to us for further follow-ups.

    Related Products

    View more related videos