Announcement

Collapse
No announcement yet.

Neural network in a metal detector

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Neural network in a metal detector

    Recently, he has been mainly involved not so much in electronics design as in implementing a neural network into the urd-1 metal detector. What experience do you guys have in your projects when it comes to implementing this type of solution?

    Greetings​!

  • #2
    No matter how developed and advanced the software is... it will only be able to process what the hardware delivers to it.

    Comment


    • #3
      Definitely. We have X, Y signals later the ground channel. Also signals from digital filters. In fact, a time-varying signal. Here you can use analysis by neural network. Just as there is such a solution used in ECG. There are already ideas when it comes to PI detectors. However, the curve analysis of the received signal is, in my opinion, more poor than can be obtained from a VLF system.

      Comment


      • #4
        For example, here it is done for a pulse detector:

        https://www.nature.com/articles/s41598-024-60592-8

        For the VLF, I use a similar network to the ECF solutions:

        https://www.nature.com/articles/s41598-021-97118-5

        https://www.mdpi.com/1424-8220/21/12/4173

        When we have a metal detector that generates two physical signals - reactive and resistive - we can use a neural network to automatically analyze these signals and predict the properties of the detected material, such as its type or physical properties. Instead of combining these signals at once, we can use an approach that processes them independently on two parallel paths (streams) and then combines these results at later stages of the net.

        Below is an example in Python using the Keras library:

        import tensorflow as tf
        from tensorflow.keras import layers, models, Input

        # Define input shape: 1000 samples for each channel (time series data)
        input_shape = (1000, 1)

        # 1. First stream (processing reactive signal)
        input_reactive = Input(shape=input_shape, name='input_reactive')

        x_reactive = layers.Conv1D(filters=32, kernel_size=3, activation='relu')(input_reactive)
        x_reactive = layers.MaxPooling1D(pool_size=2)(x_reactive)
        x_reactive = layers.Conv1D(filters=64, kernel_size=3, activation='relu')(x_reactive)
        x_reactive = layers.MaxPooling1D(pool_size=2)(x_reactive)
        x_reactive = layers.Flatten()(x_reactive)

        # 2. Second stream (processing resistive signal)
        input_resistive = Input(shape=input_shape, name='input_resistive')

        x_resistive = layers.Conv1D(filters=32, kernel_size=3, activation='relu')(input_resistive)
        x_resistive = layers.MaxPooling1D(pool_size=2)(x_resistive)
        x_resistive = layers.Conv1D(filters=64, kernel_size=3, activation='relu')(x_resistive)
        x_resistive = layers.MaxPooling1D(pool_size=2)(x_resistive)
        x_resistive = layers.Flatten()(x_resistive)

        # 3. Combine both streams
        combined = layers.concatenate([x_reactive, x_resistive])

        # 4. Shared Dense layers after combining
        x = layers.Dense(128, activation='relu')(combined)
        x = layers.Dropout(0.5)(x)
        output = layers.Dense(10, activation='softmax', name='output')(x) # Example for 10-class classification

        # 5. Build the model
        model = models.Model(inputs=[input_reactive, input_resistive], outputs=output)

        # Compile the model
        model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])

        # Display the model summary
        model.summary()

        The input shape is set to (1000, 1), meaning each input signal has 1000 time samples with a single channel.​

        First stream (reactive signal) - this part of the network processes the reactive signal. It uses two convolutional layers, followed by maximum combining layers, to extract relevant features from the signal. The result is flattened to feed the later layers.

        Second stream (resistive signal) - this part processes the resistive signal in the same way as the reactive signal, with a parallel structure of Conv1D and MaxPooling layers.

        Combining streams - the outputs of two parallel streams are combined into a single layer, merging the extracted features from both the resistive and reactive channels.

        Shared Dense Layers - once the features from both channels are merged, fully merged Dense layers are applied. A Dropout layer is added to prevent over-matching, and the final layer uses the softmax activation function to classify into 10 possible classes​.

        This is, of course, an example of simple code showing just the idea itself

        Comment


        • #5
          I think that such an approach is good for humanitarian mine detectors because the system can "learn" about signals from mines but also have an "archive" with previously prepared data.
          I still see the problem though; modern mines are mostly made of plastic, kevlar and similar materials that do not have any magnetic properties.
          Even firing pins are no longer made of magnetic materials. The system will easily and unmistakably recognize old mines that have been known for a long time.
          But with new types of mines there will be a problem in recognition.
          Now we need to think about the "foreign body" in the soil.
          The system must "take an average" of the soil composition and then locate a "foreign body" that has some sort of regular shape.
          I think the reliance on magnetic properties is over, such an approach is worn out and, in my opinion, no further progress can be made there.

          Comment


          • #6
            The Ottawa Convention plays a key role in regulating the prohibition of the use, stockpiling, production and transfer of anti-personnel mines, while mandating their destruction. A key aspect of the treaty focuses on increasing the detectability of mines, which is crucial to reducing risks to civilians, especially in post-conflict zones.

            One important provision of the treaty is the requirement that mines be easily detectable by standard mine detection equipment. This ensures that even after a conflict ends, mines can be located and safely removed.

            In simple terms, this means that all newly manufactured anti-personnel mines must contain sufficient metal or other detectable material to be easily found by standard detection tools. This measure is essential to prevent the long-term threat that undetected mines pose to civilians and humanitarian workers.​

            Traditional identification methods based on DSP and trigonometric function are over, that's a fact. However, methods using neural networks make it possible to analyze signals over time. In the case of a multifrequency detector, for example, we have 6 different signals in which to look for correlations.

            Comment


            • #7
              These days I've been watching a few more serious tests of high-end detectors, such as the CTX3030, Manticore, Deus 2 and the new X-Terra.
              I am rarely ready to praise such testing, but this time the tests are prepared quite well and simulate real situations on the fields.
              I know this is not directly related to this topic, I apologize for going off topic, but I think indirectly it can at least offer a comment on this topic.
              What did I see on those tests?
              No matter how good the machine is, no matter how advanced the technology is there; the problems remain the same, seemingly insurmountable and unsolvable.
              A coin next to a nail... an eternal theme.
              The man placed a certain number of coins, some alone and some in the presence of nails, various orientations and positions of both coins and nails.
              In most cases, all detector models failed and disappointed.
              I will not take into account weaker models of detectors, especially "handmade", where the discrimination circuit is totally rudimentary, so the behavior of such a detector gives a false impression of "penetration" through iron and successful detection of coins.
              Some will be offended and angry if I mention the name and brand.
              But in recent years there have been several "models" and "brands" of one and the same project based on the Magnum project. I hinted enough with this.
              So I will only focus on the mentioned top models from the beginning of the story.
              In those models, top technology is implemented, let's call it "Multi-F" or "Multi-IQ" or whatever, it doesn't matter. It's about similar approaches and it's the technology that represents the pinnacle today.
              And as such, that technology really delivers the most to date. But on slightly more serious tests, it failed and showed its shortcomings too.
              What does this tell me?
              The essence, the root of that technology is the reliance on the magnetic properties of the material. And nothing else.
              The I and Q components always remain the same (within the same ranges). There is no additional information in them.
              That is why I am sure that this technology has reached its peak and will not be able to advance beyond that.

              Comment


              • #8
                There is no better thn ANALOG device (well "squeesed" schematically/individually-tested components /topologically-cosidered PCB architecture/live-on terrain proven solution, that being in capable/conversant/experienced operator, that would lead to the best possible results, achieved by such complex-encompassed combination.

                (Personal non-committal and humble opinion, dissapointed by unnecessary digitalisation, which does not bring to any significant improvements, compared to analog solutions, and driven only by commersial interests...)

                Cheers enthusiasts!

                Comment


                • #9
                  Originally posted by getsa View Post
                  There is no better thn ANALOG device (well "squeesed" schematically/individually-tested components /topologically-cosidered PCB architecture/live-on terrain proven solution, that being in capable/conversant/experienced operator, that would lead to the best possible results, achieved by such complex-encompassed combination.

                  (Personal non-committal and humble opinion, dissapointed by unnecessary digitalisation, which does not bring to any significant improvements, compared to analog solutions, and driven only by commersial interests...)

                  Cheers enthusiasts!
                  Any analog signal can be converted into a discrete digital signal. Only after that the magic begins

                  Comment


                  • #10
                    "The Ottawa Convention plays a key role in regulating the prohibition of the use, stockpiling, production and transfer of anti-personnel mines, while mandating their destruction. A key aspect of the treaty focuses on increasing the detectability of mines, which is crucial to reducing risks to civilians, especially in post-conflict zones.

                    One important provision of the treaty is the requirement that mines be easily detectable by standard mine detection equipment. This ensures that even after a conflict ends, mines can be located and safely removed. "

                    That's great, but there are probably millions of mines out there that don't comply with this.

                    Comment


                    • #11
                      Originally posted by Gwil View Post

                      That's great, but there are probably millions of mines out there that don't comply with this.

                      Unfortunately, the treaty has been signed by only 80% of the countries except China, Russia and the United States are not state parties. The world is not perfect.

                      Comment


                      • #12
                        Originally posted by ivconic View Post
                        No matter how developed and advanced the software is... it will only be able to process what the hardware delivers to it.

                        I agree with this and I want say that media (and people) is putting to much enphasis on this technology...
                        I'm in the IT field (satellite, aerial mapping) and in my job it will be great beneficial, a true revolution if those buzzword AI software can recognize things by aerial images..
                        I try some of the major world products for this type of jobs and they are primitives in terms of results and quality...

                        Let me return to the ivconic statement with a true example:
                        A company show us a demo in which the AI recognize missing bolts on a raylway from an image taken by a drone... very good !! everyone was amazed... but..
                        The hightest resolution I saw from an aerial image in my career is a 10cm pixel at the surface so in reality the bolts are not visible so:

                        "...No matter how developed and advanced the software is... it will only be able to process what the hardware delivers to it..."

                        Comment


                        • #13
                          Of course, artificial intelligence is sometimes glorified too much and there is a certain hype now. However, this applies to the main LLM models.

                          There are a number of applications of convolutional networks in science, for example, in medicine, and these solutions are really effective. I gave ECG as an example because here we are analyzing signals over time. And it also works in a metal detector. I know because I already have such a solution in my project, it is not commercialized yet. It needs more time to optimize the model. The project page is here: https://urd1projekt.pl/


                          Of course, you can theoretically assume everything works or doesn't work. However, when working with AI models, practice alone is important. The results can really amaze sometimes because patterns and features are recognized that are far from linear programming.

                          Comment


                          • #14
                            Neural networks can find patterns in fuzzy data that are difficult to see using other methods, but the information must be there in the first place.
                            The training data is also very important, otherwise the network will have difficulty converging. One of the problems with NNs is that they can converge on a local minimum, so you may not get the results you expect.
                            Personally, I'm not sure an NN will generate any significantly better results in a metal detector than the methods already used. I've seen papers where NNs have been used to analyze data from mine detectors, but the advantages (or otherwise) were questionable.
                            Anyway, it's always good to experiment with new alternative ideas.

                            Comment


                            • #15
                              The applications can be many.A different quality of VDI identification without the need for normalization for i1f.Using the 3f we simultaneously extract features for the target. On a similar basis to how a neural network analyzes RGB channels. Such extraction is difficult to achieve in any other way. On LCD Spectra you see 3 types of identification but it's hard to really interpret it.

                              Another problem is the interference caused by the close proximity of trash. Here, time series analysis in a deep learning network will detect anomalies, on a similar basis to detecting anomalies in an ECG signal.

                              The problem of static discrimination. And so on. Of course, a lot of practical experience is needed, but there is no other way. If one still wants to achieve anything in this field.



                              Comment

                              Working...
                              X