Log in or register to post comments

Trained model target doesn't work

February 19, 2019 - 12:22pm #1

Hi all,

I have use MTG version 8.0 to create two model target datasets. I import them in unity as instruct here https://library.vuforia.com/content/vuforia-library/en/articles/Solution/introduction-model-targets-unity.html#single-object and it work great in two separated scenes. However, my app need these two model target in the same scene so I combine these two models to create a trained dataset using MTG (took me 60 minutes), I then follow this instruction here https://library.vuforia.com/content/vuforia-library/en/articles/Solution/introduction-model-targets-unity.html#trained. However, It doesn't work. Only one model is recognized but other is ignored.

Any idea what am I missing/doing wrong here?

Trained model target doesn't work

June 5, 2019 - 6:16am #11

Hello,



Did you changed the MaxSimultaneousTrackedObjects parameter to 2 instead of the default 1, in the Vuforia Configuration asset?

 

Trained model target doesn't work

April 15, 2019 - 11:45am #10

Hello @medabit,

 

I also try to use the Vuforia Hololens sample scene called "3-ModelTargetsTrained", and change out my model, it works great on Editor but not on a real Hololens.

Trained model target doesn't work

April 15, 2019 - 11:04am #9

Hello @medabit,

 

It has been a quite that I have time to come back to this issue.

So I have a better model that reflect geometry details. I create a new trained device database with the updated models, it works great in Unity Editor using an external USB camera. However, when load it to Hololens, it doesn't recognize at all.

Do I need to do anything special for Hololens to work? I am using MRTK 2.0-0-Beta2 and Unity 2018.3.11f1.

Thank you

Trained model target doesn't work

March 8, 2019 - 3:49pm #8

Hello @tly,

I took your updated assets and created a trained device database. Please find it attached.

Since I don't have the actual, physical object you're trying to recognize, I took arPrinter_step1_viewpoint_0000_1.png and arPrinter_step2_viewpoint_0000_1.png from the attached in forum_test_1-trained\forum_test_1\ and printed them. Both were recognized using the attached device database when running in PlayMode.

That being said, this test is not proof that the actual object can be recognized because I'm testing with an artifact generated by the Model Target Generator. However, it does prove that the device database has been activated in the project, and trained.

Can you please provide the high-level process for how you created the 3D models you're loading into the Model Target Generator? It looks like photogrammetry.

Thanks,

Vuforia Engine Support

AttachmentSize
Package icon forum_test_1-trained.zip58.28 MB

Trained model target doesn't work

March 5, 2019 - 6:24am #7

Hello medabit,

 

I modify models and retry and here is the result. The MTG with database of two models (trained database) won't work. Only one model in the database is recognized the other is ignored.

However, if I create two model target with only one model in each model target (no trained database), I imported them in Unity in two different scenes (you can't have two database activated the same time in the same scene ,can you?), they both works great!

Attached the modified models for you reference.

Anything else that I should try to get trained database work?

Thanks

 

AttachmentSize
Package icon Models.zip15.36 MB

Trained model target doesn't work

February 26, 2019 - 12:16pm #6

Hello medabit,

 

Thank for the reply. We will make the modifications and give it another try as your suggestion. Will report back the status.

 

Thanks

Trained model target doesn't work

February 25, 2019 - 3:42pm #5

Hello,

Thanks for the assets. I did some testing and have made the following observations:

  • labelPrinter_step01.fbx
    • The units from the FBX file do not make sense. I can't think of any units that the W, L and H values can be converted to make a realistic size for the object. Recall that Vuforia Model Targets use the default unit of meters, which can be converted into different units. This could create issues with detection.
    • There is no geometry in the guide view for Vuforia to detect. See the attached image.
  • labelPrinter_step02.fbx
    • Similar comment as for the other model - the FBX file's units do not make sense
    • By authoring a single guide view (non-trained), I was easily able to detect the cartridge view in Unity PlayMode using Vuforia's Model Target app in the Core samples

I'll also provide additional guidelines for your information below.

Thanks,

Vuforia Engine Support

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

There are a handful of actions you can take to improve the detection of your 3D model when using the Model Targets Feature:

  1. Correct scale of the model is important for detection and tracking. Confirm that the scale of your CAD model is an accurate representation of your physical model. We also recommend using meters as your unit of measurement.
  2. A more detailed model should provide a better tracking experience. While higher poly counts can work, we recommend keeping the count below 100k for best performance.
  3. Which elements to remove from your 3d model may depend upon the experience you're trying to create. For example, if you want to detect a car from an exterior vantage point, then the interior elements are not going to provide benefit to detection and tracking and as such you can consider removing them.
  4. Connected or fused meshes do not necessarily improve performance.
  5. Remove transparent geometry from you CAD data. For example, if you are trying to detect a car, it is recommended that you do not include any of the windows or lights in the CAD model that will be used for the Model Targets dataset.
  6. Include texture differences in your CAD model. Using the car example again, if the car has a decal painted on it or has a segment, such as the hood, that is a different color from the rest of the model, make sure that is included in your CAD model. This difference in texture will be used in the detection of the target, although it is difficult to quantify how much this can improve performance.
    • The current model targets is not designed to work with realistic-looking textures with many different colors. They work best with single-colored surfaces that contain logos, etc.
    • There are two ways to add these elements to the 3D model:
      • Map a texture onto the model. Probably the simplest solution, since you should already have that from the cylinder targets. The texture image should ideally come directly from your design software and not be from a scan of the can.
      • Use geometry with different colors. Different colors will be considered as different materials. No special material IDs are needed.
        • The “different colors” used *do not* need to match the actual colors that appear on the physical object. The difference in colors will provide the geometry needed by the SDK for detection.
  7. Use different colors on the model when there are different materials or colors on the real object. While Model Targets is designed to detect objects by shape, giving additional information on the materials will often greatly improve detection robustness.
    • There is no need for model colors to match the colors of the real object - the specific color is not relevant, just the differences in colors.
    • Colors can be used to indicate different parts with small gaps in-between that are strongly visible but are difficult to extract from a rendered view. One example is the area between the body and the door of a car.
    • If possible, avoid single-color models and file formats that can’t transport color information such as STL.
  8. Simplification tools, such as Simplygon, are able to process logos and transform them into geometry (edges). However, if you used Blender for simplification, it may destroy this info.
  9. Model targets is designed to be used with CAD-like models that use only a few colors to indicate different materials. Please avoid photorealistic textures from game-like models, or photogrammetry scans. If you need to use photogrammetry scans, please remove the texture before importing into the MTG.
  10. Try a different guideview for your target. If the guideview you are using doesn't contain enough of the geometry of your target, you may encounter issues detecting it. Often times a slightly angled view of the target will provide better results than a direct front view of the target.
    • Recommended to avoid fronto-parallel viewpoints and choose diagonal views for detection, where possible.
  11. There are a few of different approaches to a different guideview you could try that may result in better performance:
    • Try zooming in on the section of the object with the most geometry for your guideview, while keeping the rest of the model out of the view of the guideview. This will allow detection to be based off a smaller portion of the Model Target that is rich in geometry, but also will keep the rest of the model present. While moving back to see the rest of the model you will begin mapping the surroundings and likely end up with a better tracking experience.
    • Another potential guideview would be closer, but at an angle from the front-left or front-right of the object. This will allow you to get the full object in view, but also start closer and allow more tracker mapping as you move around the object.
    • Avoid highly cluttered areas on your object as detection views, such as areas with heavy wiring or highly repeated structures. Choose a view that has sufficient distinctive geometry without too many small details. It is not necessary to see the whole object for detection, but you can zoom in onto a suitable area if that is feasible for your application.

Note: Material differences are used for Model Target detection, but they do not appear in the guide view. Thus, the guide view is not the final indicator for object geometry

AttachmentSize
Image icon labelPrinter1_.png188.61 KB

Trained model target doesn't work

February 25, 2019 - 9:03am #4

Number of times to try this feature, it doesn't work on the models that I have. I check the models against the requirements, it meets the requirements here https://library.vuforia.com/content/vuforia-library/en/articles/Solution/trained-model-target-datasets.html

After having a trained model (took me 60 minutes), I uploaded it to the test app downloaded from vuforia. Launch the app and tested it, the app allows me to load my trained dataset but then that is it. It doesn't recognize any models in the set?

I upload my model here for reference. 

Any suggestion what should I do to improve this?

Thanks

AttachmentSize
Package icon Models.zip15.06 MB

Trained model target doesn't work

February 21, 2019 - 6:06am #3

Let me check and see if it I can adjust the model and improve the situation.

Trained model target doesn't work

February 19, 2019 - 1:47pm #2

Hello,

Does your dataset meet the requirements as listed here in the Multiple objects, multiple Guide Views section?

https://library.vuforia.com/content/vuforia-library/en/articles/Solution/trained-model-target-datasets.html

Thanks,

Vuforia Engine Support

Log in or register to post comments