abc-125 / segad

Segmentation-based Anomaly Detector (SegAD)
MIT License
34 stars 1 forks source link

How to train own's data images? #2

Closed ZhuJD-China closed 1 week ago

IceIce1ce commented 2 months ago

+1

baraa-m commented 2 months ago

Thank you for this interesting work! I have the same question , how we can train the model on our own dataset

abc-125 commented 1 month ago

Thank you @baraa-m!

Here is the instruction how to train it on your own images:

  1. Train the anomaly detection model of your choice (you can use anomalib) on part of your training data
  2. Take the rest of your training data and: 2.1. Get segmentation masks (can be produced by SAM or a trained segmentation model; see paper for more details) 2.2 Use the trained anomaly detection model from Step 1 to produce anomaly maps
  3. Use data from Step 2 to train SegAD; code in this repo utilizes pandas data frames to access filenames and labels
mohandeeprdori commented 1 month ago

How do I train this on VAD dataset?

abc-125 commented 1 month ago

@mohandeeprdori The same as described above, I will try to add the script later. You can also find more details in the paper.