Announcement

Collapse
No announcement yet.

Vuforia Target Detection

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

  • #16
    We went with detected two minerals and inferring the third. Worked very well.

    Comment


    • #17
      Retraining Tensorflow to detect objects other than the minerals.

      Cheer4FTC is on the right track, I believe. But for a couple of months now, I've hit a wall. I've made some progress: bazel is installed, training videos of a poker chip and a thumb drive are made, and models for each are trained. But when one of these models is used to replace the one in ConceptTensorFlowObjectDetection,the stupid thing detects Gold only. Like other Teams on here, I ignore the Silver.
      In the tutorials linked by Cheer4FTC there are several show-stopping typos, and I've filed issues for each. 2 are fixed.

      But the main question I have... has anybody trained a model to detect anything other than Minerals?

      Comment


      • #18
        Originally posted by jrasor2017 View Post
        Retraining Tensorflow to detect objects other than the minerals.

        Cheer4FTC is on the right track, I believe. But for a couple of months now, I've hit a wall. I've made some progress: bazel is installed, training videos of a poker chip and a thumb drive are made, and models for each are trained. But when one of these models is used to replace the one in ConceptTensorFlowObjectDetection,the stupid thing detects Gold only. Like other Teams on here, I ignore the Silver.
        In the tutorials linked by Cheer4FTC there are several show-stopping typos, and I've filed issues for each. 2 are fixed.

        But the main question I have... has anybody trained a model to detect anything other than Minerals?
        Honestly, for FTC I think that Tensorflow is more work than it's worth. My custom OpenCV pipeline for mineral detection did not fail once this year out of 2 qualifiers, state championship, and detroit world championship.

        Comment


        • #19
          Has has anybody trained a TensorFlow model to detect anything other than Minerals?

          Comment


          • #20
            Hi Folks - I know this is an older post, but I have created some custom TensorFlow models to detect items other than the Minerals from Rover Ruckus. The following is a semi-recent tutorial that I used to train the model. I modified so it ran the training scripts locally on a Linux (ubuntu) laptop. It took a few days to generate a model, but the model worked pretty well and the system could accurately detect the newly trained objects:

            https://medium.com/tensorflow/traini...s-b78971cf1193

            The hardest part about the process was installing the dependencies needed to run the tensorflow training scripts. Once you've done that, it's pretty straightforward to create a new inference graph. I used the tools on Google's ftc-object-detection repo (see https://github.com/google/ftc-object-detection) to generate the training and eval records that I then used to feed the training scripts.

            I hope this helps.

            Tom

            Comment


            • #21
              Thanks, Tom. Getting it done locally on arbitrary objects is something I've been trying for months. But I always hit a wall: the resultant model replacing the one in ConceptTensorFlowObjectDetection detects Gold and Silver only. It apparently makes no use of the poker chip and thumb drive eval and train records I generated. See my post #17.

              Comment


              • #22
                Originally posted by jrasor2017 View Post
                Thanks, Tom. Getting it done locally on arbitrary objects is something I've been trying for months. But I always hit a wall: the resultant model replacing the one in ConceptTensorFlowObjectDetection detects Gold and Silver only. It apparently makes no use of the poker chip and thumb drive eval and train records I generated. See my post #17.
                Hi jrasor2017,

                When you trained your model, did you use tensorboard to monitor the progress of the training? Tensorboard even has a feature that lets you see the training images and compare the model-generated results to your defined boundaries in your training records.

                Also, how many training images did you provide? Did you also include a few "negative images" (where there are objects in the image, but none of the target images)? And how many training steps did you run your model? In our experience this summer, depending on the type of number of training records/labeled training images you have, you might need a very large number (thousands) of training steps to generate an accurate model.

                When testing your custom model, did you try adjusting the confidence threshold of the tensorflow object detector? is it possible that the model is detecting the new objects (poker chips and thumb drives) but at a low confidence level?

                Regarding the general use of Tensorflow for last year's game - I realize that some people have reported mixed results on this forum for using tensorflow for last season's game (Rover Ruckus). However, I personally saw it used very effectively by several teams last year. In many cases, these teams did not have the experience to create their own custom solution using OpenCV to look for the Gold and Silver minerals. However, they were able to use Tensorflow to reliably find the gold and silver minerals during autonomous. Issues like false positives (For example, due to reflections of the game elements in the perimeter walls) were managed by adjusting the confidence threshold for their op modes, as well as adjusting the camera placement/orientation, as well as being creative (and using the IMU for example, to help keep track of where the camera is looking).

                Tom

                Comment


                • #23
                  Thanks, Tom!

                  The main problem I have is getting the scripts in https://github.com/google/ftc-object...aster/training to actually use the 265 records I have generated. They always make a copy of the model included with the ftc_app, the one that detects Gold and Silver.

                  Comment


                  • #24
                    Now, Tom, to your questions.


                    [B]

                    Comment


                    • #25
                      ... did you use tensorboard? No, not for the above recommended tutorial https://github.com/google/ftc-object...aster/training nor for the https://medium.com/tensorflow/traini...s-b78971cf1193 you recommended. I did use it in making models for arbitrary objects using Tensorflow for Poets https://codelabs.developers.google.c...e/index.html#0; that worked very well for 3 image classes: poker chip, thumb drive, nothing. But the ftc_app cannot use models trained that way.

                      Comment


                      • #26
                        ... how many training images did you provide? 50 for poker chip, 50 for thumb drive, 35 of object-filled scenes with neither. Some of the 100 positive images contain extraneous objects like computer mice, Gold and Silver Minerals, and SD memory cards.

                        Comment


                        • #27
                          how many training steps did you run your model? I cannot tell from https://github.com/google/ftc-object...aster/training. The options for script $MODEL_RESEARCH_DIR/object_detection/export_tflite_ssd_graph.py do not obviously specify the number of training steps. Neither does the bazel invocation on that page. Is it the --mean_values=128 \ or --std_values=128 \ ?

                          Comment


                          • #28
                            ... did you try adjusting the confidence threshold? No. The models I generated detect Gold and Silver very well. But I cannot get them trained on anything else, no matter what records I generate. And yes, they reject poker chips and thumb drives as neither Gold nor Silver.

                            Comment


                            • #29
                              .. is it possible that the model is detecting the new objects (poker chips and thumb drives) but at a low confidence level? I did not try that, nor will I. I don

                              Comment


                              • #30
                                I'm a happy camper if I can just get over this: How does one tell python or bazel to use the 265 records generated by python3 convert_labels_to_records.py train_data -n 8 --eval ?

                                Comment

                                Working...
                                X