- 如果想在pycharm中运行代码,可以输入下面的命令:
cd G:\xyj\MambaAD-main # 切换到项目根目录
python -m trainer.mambaad_trainer # 使用 -m 选项运行模块
-
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a si
ngle OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environmen -
(MambaAD) G:\xyj\MambaAD-main>python ader\data\gen_benchmark\visa.py
G:\xyj\MambaAD-main\ader\data\gen_benchmark\visa.py:30: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame b
ehavior). To access a value by position, useser.iloc[pos]
is_abnormal = True if data[2] == ‘anomaly’ else False
G:\xyj\MambaAD-main\ader\data\gen_benchmark\visa.py:32: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame b
ehavior). To access a value by position, useser.iloc[pos]
img_path=data[3],
G:\xyj\MambaAD-main\ader\data\gen_benchmark\visa.py:33: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame b
ehavior). To access a value by position, useser.iloc[pos]
mask_path=data[4] if is_abnormal else ‘’,
# 原始代码
is_abnormal = True if data[2] == 'anomaly' else False
info_img = dict(
img_path = data.iloc[3]
mask_path = data.iloc[4] if is_abnormal else ''
cls_name=cls_name,
specie_name='',
anomaly=1 if is_abnormal else 0,
)
# 修改后的代码
is_abnormal = True if data.iloc[2] == 'anomaly' else False
info_img = dict(
img_path=data.iloc[3],
mask_path=data.iloc[4] if is_abnormal else '',
cls_name=cls_name,
specie_name='',
anomaly=1 if is_abnormal else 0
)