Jump to content

Anyone Using Artificial Intelligence With Their Gold Detectors?


Ben201000

Recommended Posts

Hi Ben,

I've thought about this quite a bit. I think would be trivial for a neural network to sort it out. There are only a few primary dimensions to the data - it's just electrical current from the coil, that is the only sensor detectors use.

However, I think you are slightly misguided in where to apply the AI. Metal target differentiation may yield some interesting results but you can make NO assumptions about the mass, volume, shape, texture, and mineral inclusions in samples of native gold. Gold often contains silver, copper, and iron, among other metals. I have a gold nugget that is over 1% palladium (not platinum!). Gold is present as jaggedy, branching crystals as well as smooth and solid nuggets. It is found distributed through quartz and ironstone. I am deeply sceptical that any algorithm could accurately differentiate gold from not-gold.

Where a neural network would do wonders is with ground balancing and EMI cancellation - that is, the capacity of the detector to ignore everything except a solid metal object. This is what holds detector technology back far more than lack of target identification.

Such a NN-developed algorithm couldn't simply be static. You can't train it and then code it into the machine's software, because ground types are *incredibly* variable. EMI is *incredibly* variable. There is no way in hell you can get enough training data to do this perfectly, but you could (and should) ship a good-enough algorithm with the detector.

So you start your detecting with a passable (meaning, as good as current detectors) handling algorithm, but a processor on the detector (or your mobile phone, paired to the detector) then continually modifies, in near-real-time, a ground and EMI handling algorithm to be used in that session. So as you detect, the detector gets better and better at handling the ground and EMI characteristics of that area.

I'm not sure what would need to happen to modify this algorithm, I don't know this area of computer science.

My vision for such a detector would be pretty simply, hardware-wise. A phone connects (via Apple lightning or USB cable - bluetooth is too slow) to the detector. All processing happens on the phone. The detector has a battery which powers both the coil and the phone. A hardware interface on the detector handles the analog-to-digital conversion of the coil response, data transfer to and from the phone, and digital-to-analog conversion of the audio output (along with a headphone output).

The phone screen is used to change settings and get visual feedback from the detector (something that is sorely missing on current detectors). A real-time waveform display would be excellent. Imagine, detector operators, that you can see an oscilloscope type view of the raw coil data alongside processed audio waveform, in real-time. You hear the response, and see it. How incredibly useful would that be! Imagine almost infinitely fine variability of all parameters. Imagine custom timings. Regular, over-the-air software updates for the phone app and firmware updates for the detector hardware.

I believe that the company who does this first will make bank if it is implemented well.

Edit: I'm aware of Air Metal Detectors, a kickstarter project which seemed very promising at the start but seems to have flopped. It uses a phone for the processing as I suggested, but I don't think it uses AI or anything fancy internally. Just standard VLF processing.

  • Like 6
Link to comment
Share on other sites


5 hours ago, BrokeInBendigo said:

Where a neural network would do wonders is with ground balancing and EMI cancellation - that is, the capacity of the detector to ignore everything except a solid metal object. This is what holds detector technology back far more than lack of target identification.

Agreed. This is kind of what I gather Geosense is trying to do already, though much simpler and maybe not technically "AI" yet.

AI needs either constant human feedback to teach it as it makes changes, or it needs to be able to acquire it's own feedback to adjustments. Teaching it to discrim gold and iron using existing discrim (or lack thereof) circuitry is not something neural nets can do unless a human is right there for every target telling it what is good and what isn't - impossible since humans ourselves are not capable of doing this accurately to begin with, and we are slow creatures in terms of feedback to a computer.

Neural nets come up with novel, interesting solutions because they iterate billions of cycles through a sort of process emulating evolution. Humans can't provide that much feedback in a useful timespan.

EMI and to a lesser extent ground noise however, do not require human feedback because noise can be defined mathematically. A neural net can make on the fly adjustments and see for itself in real time if they've made a positive or negative result, and continually adjust based on that simple algorithm. Their limit is the speed of the CPU, not the speed of the human providing feedback.

I followed the Alpha Zero (Google) AI with a ton of interest. I love chess, and it taught itself to be the strongest chess player in history within a few days of just playing itself. AI's do great when they have constant feedback, even if the feedback is only from themselves. If they have to sit and wait for humans to give them feedback, then they aren't much better than a human themselves.

  • Like 5
Link to comment
Share on other sites

I believe that with all the data required for AI to work properly by the time it has been worked out the detector would weigh to much to use. Not only the ram, the processor, and every thing else needed to make it work, there would have to be over a dozen different circuits that would have to be user friendly for the type of area that they would be detecting in. Please don't get me started on the water aspects of the system as that will also have to be trained to detect in.

The detectors today is weighing less and less for a reason, people don't want to be swinging a 10 pound stick all day. I would love to be able to use a detector that knew for sure what was in the ground that I was about to be digging.

I wish you luck in your endeavor to create such a system, but remember that it will take years of sampling just to get the basics of the data down.

  • Like 2
Link to comment
Share on other sites

Recent Apple iPhones have a dedicated processor for machine learning tasks. You don't need crazy hardware. Well, modern smartphones are kinda crazy with how much power they have, but still, it's nothing exotic.

Another idea is to simply update the ground and EMI handling on a regular basis via software updates.

While the detector is in testing/development, a lot of training data is acquired. The detector/app doesn't need to be sophisticated at this point, the app would just record all raw data from the coil and your beta testers press a button on the app when they believe they have a target, then press another button after it has been investigated to confirm if it was metal (and what exactly it was perhaps), or if it was just ground noise/EMI.

You'd also have some people going out in various goldfields to very carefully and methodically generate high quality training data.

After your testers gather ground responses from all over the world and have timestamps for targets, you give this to a NN to figure out a model. You'll need some slack in the model of course, as humans aren't perfect.

Afterwards, you have a pretty good model. This is implemented to the detector on release. People who agree to continue helping to develop the model continue to mark targets as real when found as described. This data is given back to the developer who continues training the NN with this updated data. 

Unless a large number of people poison the well, your model will only improve as time goes on. You'd have two release channels for the model, stable and testing, which you could select in the app. Testing would be the latest changes, which may or may not be better than the stable model.

Major takeaway: You don't need to engineer or even understand your signal processing pipeline if you let a NN do it. In other words, you don't need to really understand how a metal detector works to make a very, very effective machine.

Edit: You could have different NN for different regions. For example, you could have a Pilbara model, a Ballarat model, a Clermont model, a Nevada model, etc... You could give GPS coordinates to the algorithm and have extremely specified ground balancing... The possibilities are mind-boggling. If you want to see how paradigm shifting AI can be, have a look at DALL-E 2, an imagine generation model. Here's a mind-blower of a PDF giving a lot of examples: http://dallery.gallery/wp-content/uploads/2022/07/The-DALL·E-2-prompt-book-v1.02.pdf

  • Like 1
Link to comment
Share on other sites

Hi BrokeInBendigo,

Thank you for both such in depth posts. I'll do my best to try and summarize what I understand from them and then add/ask anything more. 

First it isn't very useful (potentially impossible) to detect between metals. It is far more useful to balance the ground and reduce EMI. Is this because EMI produces a lot of noise and leads to digging holes without any metal in? Or is it mostly distracting and mentally tiring over the hours? 

Secondly the ground conditions can vary enormously, essentially making a single model that knows everything impossible. Do the ground conditions vary hugely within one detecting session or is it more in different geographical areas? 

Something I hadn't considered was the scale of the area. I.e would a very experienced detector walk through a 5 kilometre square area and be able to narrow down a few 100 meter square areas that are worth detecting? If so, could AI be useful attached to a drone that scans a 2km area with various sensors attached, and then tries to narrow a few 100m areas to look in. As I write this I realise getting training data for this would be extremely hard. 

I really like the ideas around having a screen showing the raw waveforms. 

It seems from everyone's response that conditions can be so variable that the AI would have to be trained on each separate detection session. This presents a few challenges but could be possible. YouTube/Spotify etc all train customised AI models for each person. Right now it's possible to take about 30 photos of a bird vs not-bird on a hike, and train an AI in about two minutes on a standard laptop, with about 90% accuracy (not a hugely relevant example, but this was unthinkable 7 years ago). Of course no one wants to carry a laptop around, but there are AI specific training chips which are tiny. One on the iPhone as mentioned, but also more specialised ones like the Google Coral and Nvidia Jetson Nano. There is also the possibility of sending the waveforms over to servers to quickly train, but I imagine there isn't any 4G where everyone is detecting. 

Latest thought: There is a small AI training chip (no larger than a smartphone), with a screen (probably use smartphone app for it). The raw waves from the coil somehow connect into the chip. There are 3 buttons on the screen (label 1, label 2, train AI). When someone reaches the specific site they begin by choosing the labels. Maybe metal vs not-metal, but it could be anything depending what the detector thinks could work. As you dig holes you click which label it turned out to be. After say 30 holes you click 'train' and wait about 2 minutes. It then starts giving you a real-time prediction in a percentage of which label it thinks the coil is detecting. 
In no way does this replace the detector, you'd still use your usual method, there would just be something extra to test against. The approach of this method would be to have little AIs that are personalised to each persons local knowledge, and these AIs are each persons property unless they decide to share them. They may find that it works well distinguishing between two local features and they use it for that. Or that training after 10 samples is handy but they only trust the results about 40% of the time. Or that 500 samples is required, but that's okay because they regularly detect on similar ground. Or they upload and combine data with others in similar ground conditions. 

My last thought was that to collect data wouldn't it be possible to bury a few known items and scan over them in the specific soil? Or on a larger scale bury lots of samples in an area and scan over at different heights, add more soil above and scan again etc? 

To clarify how 30 samples could possibly work. We could use transfer learning on an AI trained on millions of images (called ImageNet), and then it is taught the new samples. Some people have had a lot of success turning waveforms into images and then training them with this AI. 

Thank you so much for the Dall E prompt booklet! I've got access to it so will definitely have a read through. 

Also are you in Bendigo, Victoria, Australia? I'm in Melbourne 🙂 

Link to comment
Share on other sites

11 hours ago, BrokeInBendigo said:

Where a neural network would do wonders is with ground balancing and EMI cancellation - that is, the capacity of the detector to ignore everything except a solid metal object. This is what holds detector technology back far more than lack of target identification.

No, that is really easily sorted and works well right now.  Tracking algorithms work well, also.  I am sure AI could be applied but really you have a solution looking for a problem when it comes to ground tracking, to be frank.

But I like your thoughts on drone mapping, etc.  

In the US, the USGS basically mapped out surface features using LIDAR that are proving to be very useful for prospecting and for revealing potential areas of archeological interest that for artifact and relic hunters.

The problem to be solved is accurately tracking the coil as it is swung through the site.  GPS does not cut it from a precision standpoint, but use of a stationary drone that is tracking and tracing the coil may be just the ticket.

I think where AI and AR would be most useful as an adjunct to detecting is by mapping out ground coverage of the detectorists coil.  Many detectorists just dig it all anyway and let their brains, eyes, and shovel be the actual discriminating intelligence.  Depth is pretty much maxed out by the physical principle that forms the basis for metal detecting  - Farday's law of induction.  The targets that typically don't get recovered are either too deep (requiring another technology to be applied such as Ground Penetrating Radar) or are missed simply because the coil does not get passed over the target or gets passed over the target from the wrong approach angle.

I have pondered a method by which a detectorist can see the ground he has covered by the detector coil in a particular detecting site simply by donning a pair of smart glasses that overlay the coil path across the ground that has just been detected.  The detectorist can then improve his swing path coverage and also re-detect the "holes" in his coverage.

  • Like 2
Link to comment
Share on other sites

20 hours ago, Redz said:

I see this as being particularly useful for problematic hot rocks, especially if you can grab your sample on the spot. Perhaps even as a smart ground balance.

Hi Redz,

Excuse me for the extremely dumb questions, but are hot rocks rocks that read similar to metal? Are there certain areas where there are lots which makes it harder to look for metals? 

Link to comment
Share on other sites

1 minute ago, Chase Goldman said:

No, that is really easily sorted and works well right now.  Tracking algorithms work well.  I am sure AI could be applied but really you have a solution looking for a problem when it comes to ground tracking, to be frank.

Hi Chase,

Thanks for the feedback. Do you see any useful scenarios in being able to train between two samples of anything while in the field?

Link to comment
Share on other sites

9 minutes ago, Ben201000 said:

Hi Chase,

Thanks for the feedback. Do you see any useful scenarios in being able to train between two samples of anything while in the field?

I was still editing my post when you replied.  See above where I think a marrying of AI, AR and other emerging technologies could be of use to detectorists.

  • Like 1
Link to comment
Share on other sites

19 hours ago, Clay Diggins said:

First off a pet peeve- AI since 2015? Nothing like changing the definition to achieve the goal. You certainly mean neural network Weak AI? Alan Turing is rolling over in his grave. :smile:

Real Artificial Intelligence doesn't exist - it's only hypothetical at this point. Real Artificial Intelligence wouldn't require humans feeding training data to a program. What the public is led to believe is that intelligent Strong AI exists then they are offered Weak AI as proof of concept. We were employing Weak AI back in the late 1970's at TI - nothing new but the name.

Hi Clay,

Thank you for such an in-depth reply. I completely agree, AI is a buzzword and I didn't mean to imply any true intelligence. By 2015 I mean the rise of deep neural networks and things like cat breed classification from images, and Dall E, GTP 3 etc. 

19 hours ago, Clay Diggins said:

To answer your question the "AI" you are referring to is used in several metal detectors today. You can start with automatic ground balance. Signal acquisition and processing is where most of the development is centered today. GiGo applies to metal detectors just like every other real world system and there is a huge amount of garbage in these signals.

Is automatic ground balance something that is already 'solved' or would this be a useful application? 

19 hours ago, Clay Diggins said:

The best we can do now as programmers now is sit back and let the engineers discover a working physical system to get the data that will allow true metallic discrimination.

By this do you mean a physical system as in some kind of laser or radar etc rather than an algorithm?

I've replied a longer post to another member. I'd love to hear what you think about it.

Thank you 🙂 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...