nomewang / M3DM

MIT License
129 stars 16 forks source link

About UFF and full setting train #30

Open evenrose opened 5 months ago

evenrose commented 5 months ago

Dalao, thanks for your interesting paper. I got a quite similar result from the double-lib version. However after I trained and added UFF as a full setting, the performance dropped several percent compared with the double-lib version. I tried checkpoint-0,1and 2 or regenerate the features for UFF but none of them worked. Would you please let me know if some settings might causing this performance drop? At the same time, I found feature extraction to be CPU intensive, I allocated 16core to it and it keeps at 100% occupation while the graphics card was often waiting for CPU work. Is that reasonable? Thanks.

evenrose commented 5 months ago

I tried your pre-trained UFF, it workable and has clear performance improvement. Would you mind letting me know how you train the UFF? In your paper, it's described that "For UFF, the χrgb, χpc are 2 two-layer MLPs with 4× hidden dimension as input feature; We use AdamW optimizer, set learning rate as 0.003 with cosine warm-up in 250 steps and batch size as 16, we report the best anomaly detection results under 750 UFF training steps."

This seems inconsistent with your current code with 3 epochs.

Is that due to I only use one GPU? I have tried it on one A100 80G with

OMP_NUM_THREADS=1 

python -m torch.distributed.run --nnodes=1 --nproc_per_node=1 fusion_pretrain.py    \
--accum_iter 16 \
--lr 0.003 \
--batch_size 16 \
--data_path datasets/patch_lib \
--output_dir checkpoints \

Or I need to apply other parameters to achieve 750 epochs?