Questions about

Model Development

Preparatory work

Q: Does the cloud platform support grayscale images taken by monochrome camera?

The cloud platform supports both RGB three-channel color maps and single-channel grayscale maps. Generally, color maps will reflect more information and are better to use.

Q: Can the SDK support local testing? Do I need to be connected to the Internet when local testing ?

The SDK supports local testing without the need for an Internet connection. You only need to download the trained model file and SDK toolkit from the cloud platform for offline testing.

Q: My computer has an integrated graphics card, can I use SDK for software development?

Yes. If your computer is not an Nvidia graphics card, you can use the CPU device for software development.

See How to use CPU for software development

Q: How do I check if the computer environment configuration is supported?

See AI Model Deployment / How To Use SDK(C++) / 2 Environment Setup for environment configuration

Q: Why do I get path errors when I run the program after modifying the model path and image path in the demo?

Please use the double backslash "\\" for the path separator in the code, not the single backslash "\". For example, the path of the file where you store the picture is "C:\Users\81098\Desktop\test_pic". If you put it in the code like this, it will report an error!

Please use a double backslash: "C:\\Users\\81098\\Desktop\\test_pic"

Q: The test images work well after training in the cloud platform, but the offline test images do not work well, why?

The resolution of the images for online training model should be similar to the resolution of the images for offline testing. If you fail to achieve the expected result when testing images offline, please check whether the resolution of both is the same.

Q: When conflicts occur while configuring system environment variables, how should they be resolved?

When configuring environment variables, conflicts may occur with previously configured environment variables, resulting in exceptions or errors when calling the SDK. To resolve this issue, you need to remove the conflicting environment variables from the PATH.

For Windows 11 systems, the added environment variables should be moved to the top of the list.

Q: How to use CPU to invoke the SDK for development?

The steps for using CPU to invoke the SDK are the same as using an NVIDIA graphics card. You just need to modify the device_name variable in the code. Change it from "cuda" to "cpu".

You can click here for more information.

AI Model Deployment / How To Use SDK(C++)

Q: Why is the accuracy of the model I trained low?

90% of the reason is due to labeling issues.

The following situations can contribute to poor model performance:

1. Grouping different visual styles of defects under a single "defect" label.

If the specific type of defect is not important, and the goal is simply to identify any kind of defect, it might be tempting to label all different-looking defects as a single "defect" label. This approach can confuse the model and prevent it from effectively recognizing specific defects.

Correct approach:

Regardless of whether the specific type of defect is important, it is crucial to classify defects based on visual differences. For example, defects can be categorized as scratches, holes, or other specific labels.

2. Only labeling a portion of defects in an image with multiple defects, while leaving out others.

Both the labeled portion and the unlabeled "background" portion in an image are used for training the model. However, if some defects are not labeled, the model is effectively being told, "This is not a defect," which confuses the model: Why are some visually similar areas labeled as defects while others are not?

Correct approach:

All defects in an image should be labeled without exceptions.

If there are too many and you are too lazy to mark them, then use the "mask area" function on the markup page of the platform to cover the ones you don't want to mark up.

Overall, if the target style is more consistent, the cumulative marking target should be large dozens of attempts to see.

The following chart is to mark the steel pipe, to follow the "should be marked as much as possible" principle.

If you don't want to mark all of them, you can mark some of them first and then mask out the rest of the area.

3. "Are these considered defects? Some points are ambiguous, whatever, let the model judge"

If the manual labeling of a defect is not clear, the labeling will be "scaled" differently, and thus the model will be successfully confused during training, and will be as unclear as the manual.

Correct approach: It is important to implement a scale for defect criteria, especially when multiple people are labeling the same data set. Only by labeling at a uniform scale will the model be trained consistently.

4. Use a box larger than the target to label the defects

The large box includes the target of the defect, as well as many background parts. This also allows the model to confuse the target and the background when using the anchor box to locate the defect, thus costing the model a lower recognition accuracy.

Correct approach: The defective target should be annotated by circling it with an appropriately sized rectangular box (for target positioning) or polygon (for pixel segmentation) that exactly frames the target.

Still have a question?

Each section should be concise, user-friendly, and direct users to additional resources or documentation when necessary.