Skip to main content
Version: Next

VAD Input and Artifacts

Updated 2025.05.12

Data Preparation

Prepare your training data

Prepare normal (or identical) image data with the same shape (1024x1024, 3 channels) in the 1. png, .jpg shape. 2. Prepare a tabular ground truth file consisting of the image path and the correct answer label (all of which are normal, so write them in the same type). 3. If you have some abnormal (or a few other types) image data, you can include it in the training data to create a more accurate AI model. 4. Prepare the ground truth file in the following form. 5. When preparing a ground truth file, it is not necessary to uniform labels for images as long as they have multiple types. 6. If there is data that you want to verify, enter the item name in the 'train_validation_column' argument, and the image corresponding to train will be used for training, etc. Images can be used for verification to check performance. (Even if there is only a normal image, only the performance cannot be derived, but it is trained normally.) 7. Prepare the ground truth file and the image file by putting them in the same folder. 8. For inference data, prepare a ground truth file as well as training data, or prepare the image you want to infer in one folder. (For inference data, if you don't have a Ground truth file, it looks at the path where the image was saved and generates the file internally.) 9. Even though the training data type is composed of several types, it is classified into only two types: normal type and abnormal type.

Training dataset example

labelimage_pathtrain_val_split
good./image0.pngtrain
bad./image1.pngvalid
good./image2.pngtrain
good./good/image0.pngtrain
good./good/image1.pngtrain
good./good/image0.jpgtrain
good./good/image1.jpgtrain

Example input data directory structure

/project_folder/sample_data
└ inference
└ 10479_0.png
└ 1080_7.png
└ 10735_7.png
└ train
└ train.csv
└ abnormal
└ 10019_0.png
└ 10024_0.png
└ 10097_0.png
└ good
└ 10395_7.png
└ 10034_7.png
└ 10852_7.png


Data Requirements

Essential Requirements

The input data must meet the following conditions:

indexitemspec.
1Enough Normal or Single-Type Images100~50000
2Ground Truth File Item Name Form Compliance (label, image_path)Yes
3Fixed number of channels: 3 or 1 channel (gray)Yes
4Resolution32x32 ~ 1920x1920 pixels
5Is the inference interval for new images greater than 3 secondsYes
6Is the time interval required for learning to be more than 6 hoursYes
  • See Data Examples

Additional Requirements

Conditions to ensure minimum performance. Even if the following conditions are not met, the algorithm will still work, but the performance has not been confirmed

indexitemspec.
1Save the image name as a unique name regardless of typeYes
2Obtaining a small number of anomalies to verify AI performance10 pieces per type
3Resolution224x224 ~ 1024x1024 pixels
4Region Of Interests (ROI) Size15 x 15 pixels or larger at 224 x 224
5Fixed product position/orientation/distance from cameraTolerance: Rotation +/- 3 degrees or less, translation 1 pixel or less at 224x224
6Image must be in focusYes
7Image measurement environment: Maintain the same and consistent environment as much as possible during training/verification/operation (brightness, illumination, background, etc.)Yes


Artifacts

Training/inference will produce the following outputs:

model config

/project_folder/.workspace/vad/model_artifacts/config
└ config
└ input
└ config.json
└ readiness
└ config.json
└ train
└ config.json
└ fastflow_model.ckpt
└ model_lite.pt
└ model.pickle
└ best_model_path.json

Train pipeline

/project_folder/.workspace/vad/history/latest/train
└ dataset
└ abnormal
└ 1.png
└ 2.png
└ ...
└ good
└ a.png
└ b.png
└ ...
└ train.csv
└ output
└ output.csv
└ score
└ train_summary.yaml
└ extra_output
└ images
└ abnormal_1.png
└ abnormal_2.png
└ ...
└ threshold_test_result.csv
└ threshold_test_result.png
└ validation_classificaion_report.json
└ validation_confusion_matrix.csv
└ validation_score.csv
└ log
└ pipeline.log
└ process.log

Inference pipeline

/project_folder/.workspace/vad/history/latest/inference
└ log
└ pipeline.log
└ process.log
└ dataset
└ 1.png
└ 2.png
└ ...
└ score
└ inference_summary.yaml
└ output
└ output.csv
└ 1.jpg

The detailed description of each deliverable is as follows.

{model_name}_model.ckpt

This is a model file that has been trained.

output.csv

It is a tabular file in which the results of inferences and probabilities are recorded.

validation_confusion_matrix.csv

A confusion matrix file that stores the results of the performance of the validation data in the training pipeline. It is only stored if there is abnormal data in the validation data.

validation_score.csv

A file that records performance on validation data from a training pipeline. Accuracy, precision, recall, F1-score, and AUROC are recorded.

{imagefilename}.png

This is an image where an abnormal area is shown. For the training pipeline, save for incorrectly inferred images and all abnormal images. For inference pipelines, the output folder stores the original images for retraining.

inference_summary.yaml

A summary file of the inference results. It is used by edge conductors and consists of score, result, probability, and so on.

threshold_test_result.csv

This is a table of performance changes for validation data when the threshold for anomaly detection is changed.

threshold_test_result.png

This graph of performance change when the threshold for anomaly detection is changed.



VAD Version: 3.0.0