GithubHelp home page GithubHelp logo

mmr's People

Contributors

zhangzilongc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mmr's Issues

关于指标计算的一些疑问

您好,非常期待您能指教我一下遇到的这个问题,非常感谢!
我在运行代码后( AeBAD- S )有一些指标显示为零导致最后的平均指标拉低了,可以请教下如何解决有的指标为0的这个问题吗
8a6eb6e1959d187268070259c68bb95
26370e12116e9cf7e89e8ab20dd76be
a4c797f85dd4db15c97abf106f9c4e5

Anomaly map

Hello, Thank you for your excellent work. I have a query regarding the anomaly map. In the paper, you mentioned the process of computing anomaly maps, but you used cosine similarity in the code. Is their anything I missing. Can you please elaborate on the difference between paper and implementation?
Code:

def cal_anomaly_map(fs_list, ft_list, out_size=224, amap_mode='mul'):

Paper:

image

Train and Test process of AeBAD-S

您好,阅读完论文之后,没有特别理解用AeBAD-S数据集在训练及test时要怎么分配数据,想和您确认:
训练数据时:train中的所有图片都会作为输入,最终生成1个异常检测模型
test即推理时:按照same, background, illumination, 和view这4个维度分别推理,然后每个维度分别计算指标(如论文结果)吗?

期待您的回答,十分感谢!

License

I noticed that there isn't a license specified in the repository, would you be able to clarify if the project is intended for open-source sharing and collaboration?

If so, would you consider adding a specific license? Thank you very much.

some questions

跑aebad_v数据集时代码出现路径混乱问题

root@autodl-container-b8cd118952-a284ba93:~/autodl-tmp# sh AeBAD_V_run.sh
[06/06 10:11:25][INFO] main.py: 26: {'DATASET': {'domain_shift_category': 'same',
'imagesize': 224,
'name': 'aebad_V',
'resize': 256,
'subdatasets': ['AeBAD_V']},
'NUM_GPUS': 1,
'OUTPUT_DIR': './log_MMR_AeBAD_V_54',
'RNG_SEED': 54,
'TEST': {'VISUALIZE': CfgNode({'Random_sample': False, 'Sample_num': 40}),
'dataset_path': './AeBAD',
'enable': False,
'method': 'MMR',
'pixel_mode_verify': False,
'save_segmentation_images': False,
'save_video_segmentation_images': True},
'TEST_SETUPS': CfgNode({'batch_size': 32}),
'TRAIN': {'MMR': {'DA_low_limit': 0.7,
'DA_up_limit': 1.0,
'FPN_output_dim': (256, 512, 1024),
'feature_compression': False,
'finetune_mask_ratio': 0.4,
'layers_to_extract_from': ['layer1', 'layer2', 'layer3'],
'load_pretrain_model': True,
'model_chkpt': './mae_visualize_vit_base.pth',
'scale_factors': (4.0, 2.0, 1.0),
'test_mask_ratio': 0.0},
'backbone': 'wideresnet50',
'dataset_path': './AeBAD',
'enable': True,
'method': 'MMR',
'save_model': False},
'TRAIN_SETUPS': {'batch_size': 16,
'epochs': 200,
'learning_rate': 0.001,
'num_workers': 1,
'warmup_epochs': 50,
'weight_decay': 0.05}}
[06/06 10:11:25][INFO] main.py: 27: path_to_config is method_config/AeBAD_V/MMR.yaml
[06/06 10:11:25][INFO] main.py: 31: start training!
[06/06 10:11:25][INFO] train.py: 27: load dataset!
[06/06 10:11:25][INFO] train.py: 55: current individual_dataloader is aebad_V_AeBAD_V.
[06/06 10:11:25][INFO] train.py: 56: the data in current individual_dataloader aebad_V_AeBAD_V are 707.
[06/06 10:11:28][INFO] train.py: 73: train the decoder FPN of MMR from scratch!
[06/06 10:11:28][INFO] train.py: 76: MAE load meg: _IncompatibleKeys(missing_keys=['decoder_FPN_mask_token', 'decoder_FPN_pos_embed', 'simfp_2.0.weight', 'simfp_2.0.bias', 'simfp_2.1.weight', 'simfp_2.1.bias', 'simfp_2.3.weight', 'simfp_2.3.bias', 'simfp_2.4.weight', 'simfp_2.4.norm.weight', 'simfp_2.4.norm.bias', 'simfp_2.5.weight', 'simfp_2.5.norm.weight', 'simfp_2.5.norm.bias', 'simfp_3.0.weight', 'simfp_3.0.bias', 'simfp_3.1.weight', 'simfp_3.1.norm.weight', 'simfp_3.1.norm.bias', 'simfp_3.2.weight', 'simfp_3.2.norm.weight', 'simfp_3.2.norm.bias', 'simfp_4.0.weight', 'simfp_4.0.norm.weight', 'simfp_4.0.norm.bias', 'simfp_4.1.weight', 'simfp_4.1.norm.weight', 'simfp_4.1.norm.bias'], unexpected_keys=[])
Traceback (most recent call last):
File "main.py", line 47, in
main()
File "main.py", line 40, in main
train(cfg=cfg)
File "/root/autodl-tmp/tools/train.py", line 99, in train
MMR_instance.fit(individual_dataloader)
File "/root/autodl-tmp/models/MMR/MMR_pipeline.py", line 49, in fit
for image in individual_dataloader:
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in next
data = self._next_data()
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/root/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/autodl-tmp/datasets/mvtec.py", line 89, in getitem
image = default_loader(image_path)
File "/root/miniconda3/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 215, in default_loader
return pil_loader(path)
File "/root/miniconda3/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 195, in pil_loader
with open(path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: './AeBAD/AeBAD_V/train/good/./AeBAD/AeBAD_V/train/good/video1_train/28.jpg'
大佬可以帮忙解决一下吗

_IncompatibleKeys(missing_keys

- [03/25 15:01:09][INFO] main.py:   27: path_to_config is method_config/MVTec/MMR.yaml
- [03/25 15:01:09][INFO] main.py:   31: start training!
- [03/25 15:01:09][INFO] train.py:   27: load dataset!
- [03/25 15:01:09][INFO] train.py:   55: current individual_dataloader is mvtec_01.
- [03/25 15:01:09][INFO] train.py:   56: the data in current individual_dataloader mvtec_01 are 400.
- [03/25 15:01:11][INFO] train.py:   73: train the decoder FPN of MMR from scratch!
- [03/25 15:01:11][INFO] train.py:   76: MAE load meg: _IncompatibleKeys(missing_keys=['decoder_FPN_mask_token', 'decoder_FPN_pos_embed', 'simfp_2.0.weight', 'simfp_2.0.bias', 'simfp_2.1.weight', 'simfp_2.1.bias', 'simfp_2.3.weight', 'simfp_2.3.bias', 'simfp_2.4.weight', 'simfp_2.4.norm.weight', 'simfp_2.4.norm.bias', 'simfp_2.5.weight', 'simfp_2.5.norm.weight', 'simfp_2.5.norm.bias', 'simfp_3.0.weight', 'simfp_3.0.bias', 'simfp_3.1.weight', 'simfp_3.1.norm.weight', 'simfp_3.1.norm.bias', 'simfp_3.2.weight', 'simfp_3.2.norm.weight', 'simfp_3.2.norm.bias', 'simfp_4.0.weight', 'simfp_4.0.norm.weight', 'simfp_4.0.norm.bias', 'simfp_4.1.weight', 'simfp_4.1.norm.weight', 'simfp_4.1.norm.bias'], unexpected_keys=[])

"Hello, although it can run, the log indicates that there are incompatible keys when loading the model parameters. Will this affect the experimental results, or can it be ignored? Looking forward to your reply."

Save_model

Hello,

Thank you for your work.
I trained your model on the default setting using the Aebad_S dataset. But I cannot see the saved model although I use the save model flag as true.

Please elaborate on how to save the model and load it back to test on different images. How we can resume the model from ckpt. In addition, If possible how we can train on the custom dataset? Thank you for your time.

imagesize修改

你好,很高兴可以在Github上收到您的回复。目前我正遇见一个难题,希望能得到您的帮助。我在用您在Github上的MMR-master 模型训练我自己的数据集(图片的大小为1280 x 1024)时,想让最后的结果显示为256x256的热力图。我修改了imagesize
但是运行时出现了一下错误,能帮我解决下么;
2023-05-22 12-11-11屏幕截图
2023-05-22 12-18-44屏幕截图

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.