You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Train the encoder and decoder supervised by Point_cu, scribble, or Max(SAM(Box_prompt)), where Max(SAM(Box_prompt)) is part of the Segment Anything model.
Put P_mask and segment anything's mask in './xxx'
python Filter_and_Matcher.py
Distillation encoder and decoder
Just download the dataset and pretrained model.
Train:
The pretrained model weight can be found here: Pretrain_model . (put it in './SAM-guided-Unified-Framework-for-Weakly-Supervised-Camouflaged-Object-Detection/Pretrain_model.pth').
The masks for distillation are in the path './CodDataset/train/Scribble'.
Put the Prompt-kd-mask in './SAM-guided-Unified-Framework-for-Weakly-Supervised-Camouflaged-Object-Detection/CodDataset/train/S_GT'.
Box-kd-mask. Following the operations in the paper. Using P-Mask (in section of Filter-and-Mathcer. Foreground set to 1, background set to 2) to compare with the key regions, retain the original values in the key regions, and set the values outside the key regions to 0.
python train.py
Test and Evaluate:
Put model-best.pth (save in './SAM-guided-Unified-Framework-for-Weakly-Supervised-Camouflaged-Object-Detection/out/trained') in './SAM-guided-Unified-Framework-for-Weakly-Supervised-Camouflaged-Object-Detection/best_model.pth'