读CPMF代码

首先preprocess_dataset.sh
需要安装open3d
不太懂为什么相对路径用不了,改成了绝对路径

preprocessing.py

同样是去背景(对比了一下,其实和sg里的代码是一模一样的)

generate_multi_view_dataset

这里发现不能直接用它官方的torch版本,不兼容,所以需要注意module ‘torch‘ has no attribute ‘Tensor‘的蛋疼问题

遍历所有的tiff

preprocess_pc

输入tiff_path(包括异常类型,训练/测试的绝对路径), dataset_path(这个是全局变量总路径), save_dir,还有一个render_utils.MultiViewRender类对象multi_view_vis

multi_view_vis = render_utils.MultiViewRender('', color=render_utils.MultiViewRender.COLOR_UNIFORM)

读取结构化的pc 800,800,3、rgb 800,800,3、gt
将pc最近邻差值resize成224,224,3,再无结构为50176,3,并取出非0元素,由此实例化o3d_pc,赋给它一个仿射变换矩阵([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]])后叫做_224_pcd
rgb也resize成224,224,3叫做_224_rgb,且整一个非0、归一化、无结构的叫做_224_nonezero_rgb 15873,3

将pc保持原尺寸,取出非0的元素,由此实例化o3d_pc,赋给它那个仿射变换矩阵后叫做_ori_reso_pcd
rgb也保持原尺寸叫做_ori_reso_rgb,且整一个非0、归一化、无结构的叫做_ori_nonezero_rgb 202527,3

calculate_fpfh_features
_ = multi_view_vis.calculate_fpfh_features(_ori_reso_pcd)

这个方法calculate_fpfh_features是用于计算点云的FPFH(Fast Point Feature Histograms)特征的。FPFH是一种用于3D点云描述的重要特征,常用于点云的配准、识别和分类中。以下是该方法的详细步骤分析:

  • 定义体素大小:voxel_size = 0.05 设置了一个体素的大小。这个值定义了用于下一步估计点云法线时空间的分辨率。
  • 计算法线估计的搜索半径:radius_normal = voxel_size * 2 定义了一个半径,用于在计算每个点的法线时考虑的邻域大小。这里,邻域的半径被设置为体素大小的两倍。
  • 估计点云的法线:pcd.estimate_normals(o3d.geometry.KDTreeSearchParamHybrid(radius=radius_normal, max_nn=30)) 这一步利用了KD树的混合搜索方法来估计点云中每个点的法线。radius_normal定义了搜索的半径,而max_nn=30限制了最多考虑的邻近点数。(计算的法线不返回,直接存入pcd对象)
  • 定义用于FPFH计算的搜索半径:radius_feature = voxel_size * 5 这里设置了计算FPFH时考虑的邻域大小,设为体素大小的五倍。
  • 计算FPFH特征:调用o3d.pipelines.registration.compute_fpfh_feature来计算点云的FPFH特征(pcd_fpfh)。与法线估计类似,这里也使用了KD树的混合搜索参数,radius=radius_feature定义了搜索邻域的半径,max_nn=100是考虑的最大邻近点数。
  • 转置FPFH特征矩阵:fpfh = pcd_fpfh.data.T 获取计算出的FPFH特征,并对其进行转置。FPFH特征矩阵中的每一列代表一个点的FPFH特征,转置后每一行代表一个点的FPFH特征。
  • 返回FPFH特征:最后,该方法返回转置后的FPFH特征矩阵(fpfh 202527,33)。

通过这个方法,我们可以得到点云中每个点的FPFH特征,这些特征可以进一步用于点云数据的分析和处理,比如点云匹配和识别任务。(但是fpfh显然是没有利用到的,那可能只是为了给计算法线?)

multiview_render
images, points = multi_view_vis.multiview_render(_ori_reso_pcd, _ori_nonezero_rgb, _224_pcd)

multiview_render用于从多个视角渲染点云,并在每个视角下产生一个2D图像和相应的2D点。
输入参数:
pcd: 一个o3d.geometry.PointCloud对象,代表要渲染的点云。
rgb: 点云对应的RGB颜色值,用于在COLOR_RGB模式下给点云上色。
ref_points: 参考点集,用于在渲染过程中计算2D点。(那么这里其实相当于把原尺寸的点云搞到224尺寸的视角2d图?)
颜色设置: 根据self.color_option的设置,点云的颜色会以不同的方式确定。

  • 如果是COLOR_FPFH,会先计算点云的FPFH特征,然后使用PCA转换这些特征来为点云上色。
  • 如果是COLOR_UNIFORM,会为点云上一个统一的颜色。(默认就是这个)
  • 如果是COLOR_RGB,会使用提供的rgb值为点云上色。

视角渲染:

  • 对于self.angles中定义的每个角度(self.angles是27个三元角度值组成的列表,表示对点云在 x、y、z 轴的旋转角度),使用rotate_render方法旋转并渲染点云,生成2D图像和对应的2D点。

rotate_render基本上是基于open3d的方法实现的

  • 先根据角度得到一个3d变换矩阵R(例如由[0,0,0]得到[[1,0,0],[0,1,0],[0,0,1]])
  • 然后对点云_ori_reso_pcd和参考点集_224_pcd利用R旋转
  • vis.add_geometry(pcd_temp)将旋转后的点云添加到渲染可视化器中。
  • image = vis.capture_screen_float_buffer(do_render=True)捕获当前视窗的图像,这里的图像是浮点型的,范围在0到1之间。(是Image类型,不过也算是224,224,3的图片了,这里的224是初始化vis时设置的窗口大小,所以原尺寸的点云经过vis截图也就是224大小的了)
  • points2d = calculate_points2d(vis, np.asarray(ref_points_temp.points).T)计算参考点在2D图像上的位置。这个calculate_points2d用于将3D点映射到2D图像上。(这里输入的点云pcd是224尺寸的点云的无结构矩阵,也就是3,15873的ndarray)

calculate_points2d

  • 获取视图控制器和相机参数:
    ctr = vis.get_view_control(): 从可视化对象获取视图控制器。
    param = ctr.convert_to_pinhole_camera_parameters(): 将视图控制器的状态转换为针孔相机参数。
  • 提取内参和外参矩阵:(反映的是当前视角下的相关设置)
    intrinsics = param.intrinsic.intrinsic_matrix: 从相机参数中获取内参矩阵,这描述了相机的内部特性,如焦距和主点。尺寸3,3
    extrinsics = param.extrinsic: 获取外参矩阵,这描述了相机相对于世界坐标系的位置和方向。尺寸4,4
  • 使用 OpenCV 进行点云的投影:
    rvec = cv2.Rodrigues(extrinsics[:3, :3])[0]: 将旋转矩阵转换为旋转向量。Rodrigues 函数用于将旋转矩阵和旋转向量之间进行转换。(大概相当于一种压缩稀疏存储变量,例如一个矩阵np.array([[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]])可以转化为[0,0,1.57079633]这样的向量,表示绕z轴旋转1.57079633弧度)得到尺寸3,1
    tvec = extrinsics[:3, 3:]: 获取平移向量。(因为一般来说外参矩阵的前三列构成了旋转矩阵,描述了坐标系的旋转。 最后一列是平移向量,描述了坐标系的平移。)尺寸3,1
    points2d, _ = cv2.projectPoints(pcd, rvec, tvec, intrinsics, None): 使用 projectPoints 函数将三维点(其实已经是二维矩阵了)投影到二维图像平面。这个函数需要旋转向量、平移向量、内参矩阵以及点云坐标。得到尺寸15873,1,2
  • 格式调整并返回结果:
    return points2d[:, 0, :].T: 调整返回的二维点格式,使其适合后续处理或可视化。points2d 的形状经过调整,以确保输出是一个两行的数组,其中每列代表一个点的二维坐标。得到尺寸2,15873

这个函数对于将三维空间中的点云转换为二维图像中的点集非常有用,尤其是在进行三维重建或者从多个角度观察点云时。

  • vis.clear_geometries()清除可视化器中的所有几何体,为下次渲染准备。
  • 图像格式转换:image = cv2.cvtColor(np.asarray(image) * 255, cv2.COLOR_RGB2BGR)将捕获的图像从RGB转换为BGR格式,并将其数据类型从浮点型转换为整型,以便于在OpenCV中使用。
  • 返回值:返回点云旋转并渲染后的2d图像image,以及参考点在该图像上的2D坐标points2d

通过这个方法,可以从不同的角度查看和分析点云数据,同时获取3D点到2D图像的映射,这对于点云数据的可视化和进一步分析是非常有用的。

将每个视角下得到的图像和2D点存储在image_list和ponints_list中。
返回值: 返回两个列表:image_list包含从每个视角渲染得到的图像,ponints_list包含每个视角下点云的2D点。

从而有这个原始像素下各视角图像images(保存成png)和点坐标points(转成int类型后保存成npy)
再通过calculate_fpfh_features获得_224_pcd这个变形后的点云的fpfh特征 15873,33,也保存成npy文件
此外rgb、gt也都非覆盖保存224尺寸的版本,pc倒是直接拷贝一份原尺寸的
在这里插入图片描述

main

run_exp其实就是遍历所有类别的main
训练集取数据有sample(img 1,3,224,224(原尺寸的png resize成224尺寸,且归一化)、resized_organized_pc 1,3,224,224、features 1,16817,33(就是fpfh)、view_images(就是27个视角下的1,3,224,224,Transform里的插值resize其实没有用到,因为前面预处理时已经是224尺寸了,所以只是归一化了)、view_positions(27个视角下的二维点集 1,2,16817))、gt 1,1,224,224、label 0(后两个这里没有用到)

fit

calculate_view_invariance_feature

遍历每一个image和position

calculate_single_view_feature

先把image 1,3,224,224输入给网络

CPMF_Features(
  (deep_feature_extractor): ModelINet(
    (backbone): FeatureListNet(
      (conv1): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
      (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (act1): ReLU(inplace=True)
      (maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
      (layer1): Sequential(
        (0): BasicBlock(
          (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (drop_block): Identity()
          (act1): ReLU(inplace=True)
          (aa): Identity()
          (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (act2): ReLU(inplace=True)
        )
        (1): BasicBlock(
          (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (drop_block): Identity()
          (act1): ReLU(inplace=True)
          (aa): Identity()
          (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (act2): ReLU(inplace=True)
        )
      )
      (layer2): Sequential(
        (0): BasicBlock(
          (conv1): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
          (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (drop_block): Identity()
          (act1): ReLU(inplace=True)
          (aa): Identity()
          (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (act2): ReLU(inplace=True)
          (downsample): Sequential(
            (0): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False)
            (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
        )
        (1): BasicBlock(
          (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (drop_block): Identity()
          (act1): ReLU(inplace=True)
          (aa): Identity()
          (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (act2): ReLU(inplace=True)
        )
      )
      (layer3): Sequential(
        (0): BasicBlock(
          (conv1): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
          (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (drop_block): Identity()
          (act1): ReLU(inplace=True)
          (aa): Identity()
          (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (act2): ReLU(inplace=True)
          (downsample): Sequential(
            (0): Conv2d(128, 256, kernel_size=(1, 1), stride=(2, 2), bias=False)
            (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
        )
        (1): BasicBlock(
          (conv1): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (drop_block): Identity()
          (act1): ReLU(inplace=True)
          (aa): Identity()
          (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (act2): ReLU(inplace=True)
        )
      )
    )
    输出三个,1,64,56,561,128,28,281,256,14,14组成的list
  )
  '''
  (average): AvgPool2d(kernel_size=3, stride=1, padding=0)
  (blur): KNNGaussianBlur()
  (resize): AdaptiveAvgPool2d(output_size=(28, 28))
  '''
)

输出的这三个直接从cuda再转回cpu
然后再分别双线性插值到1,64,224,224、1,128,224,224、1,256,224,224
pcd_features.append(f_resize[:, :, position[0, 1, :], position[0, 0, :]])这样得到1,64,16817、1,128,16817、1,256,16817组成的list,再拼接成1,448,16817
从而有27个视角上的这个pcd_feature,将其拼接并均值转置得到view_invariant_feature 16817,448,再对其归一化
从而完成rgb块的处理

接下来是fpfh的处理
取出sample里面的fpfh 16817,33,对其归一化

如果no_fpfh为false,那么将这两部分拼接得到concat_patch 16817,481
否则,直接concat_patch=view_invariant_feature 16817,448

unorganized_data_to_organized

输入sample里的结构pc,concat_patch作为非0项,包在一个列表里
把pc做成50176,3去结构后再取非零项索引
定义一个全零的full_data 50176,481
然后根据非零索引把concat_patch这非零项填入full_data的对应位置
随后把full_data转成concat_feature_maps 1,481,224,224返回

对它两次平均池化 1,481,28,28
再把它做成784,481后存入patch_lib这个memory_bank
整个数据集遍历完244个batch,然后再把这个list的memory_bank拼接得到191296,481

get_coreset_idx_randomp

因为采用默认的f_coreset=0.1<1,所以对这个memory_bank再稀疏一些
这样有输入n=19129,z_lib 191296,481,eps 0.9

transformer = random_projection.SparseRandomProjection(eps=eps)
z_lib = torch.tensor(transformer.fit_transform(z_lib))

计算得到191296,300
初始化select_idx= 0
取last_item=z_lib[select_idx:select_idx + 1]
计算与其的欧氏距离min_distances 191296,
初始化select_idx= 0,且核心集索引列表 coreset_idx= [torch.tensor(select_idx)]

核心集选择过程:

  • 通过遍历n轮,迭代找出距离当前核心集最远的点:
    • 计算 z_lib 中每个点到 last_item 的距离distances。
    • 更新 min_distances 为当前距离distances和之前迭代的最小距离min_distances中的较小值。
    • 选择 min_distances 中最大值对应的索引为新的核心点select_idx。
    • 从而更新 last_item ,并在 min_distances 中将新核心点select_idx的距离设为 0,避免重复选择。
    • 在coreset_idx中添加新的select_idx

从而将coreset_idx这13129个select_idx拼接13129,
存为13129,类内属性coreset_idx
并由此索引更新memory_bank patch_lib 13129,481

evaluate

从测试集中每batch得到sample(img 1,3,224,224、resized_organized_pc 1,3,224,224、features 1,17703,33、view_images(就是27个视角下的1,3,224,224)、view_positions(27个视角下的二维点集 1,2,17703))、gt 1,1,224,224、label

predict

其实前半部分和calculate_view_invariance_feature一模一样。直到得到concat_patch 784,481

compute_s_s_map

  1. 首先计算这个patch与memory_bank的距离dist,得到距离最小的值及其索引 min_val(784位), min_idx
s_idx = torch.argmax(min_val)
s_star = torch.max(min_val)
m_test = patch[s_idx].unsqueeze(0)  # anomalous patch
m_star = self.patch_lib[min_idx[s_idx]].unsqueeze(0)  # closest neighbour
  1. 对最异常的补丁(m_test)与其最近邻(m_star)进行重加权计算。
    - 计算距离:计算 m_star 与参考库中所有补丁的距离 w_dist,目的是找到 m_star 在参考库中的 k 最近邻(k-NN)。
    - 选择k-NN:通过 torch.topk 选择距离 m_star 最近的 3 个补丁的索引, nn_idx,这是重加权计算的一部分,目的是确定哪些参考补丁与 m_star 最相似。(注释说这里对应论文公式7,之后对一下)
  2. 计算重加权分数(w)并应用到s_star上得到最终分数(s)。
    - 距离计算:计算 m_testm_star 的 k-NN 之间的距离 m_star_knn,这些距离将用于下一步的加权计算。
    - 归一化技巧:使用 Softmax 归一化技巧,这在处理大规模向量时很有用,可以避免因向量范数过大导致的数值不稳定。(其实也就是取个长度的开方,自注意力公式等处经常见到)
D = torch.sqrt(torch.tensor(patch.shape[1]))
w = 1 - (torch.exp(s_star / D) / (torch.sum(torch.exp(m_star_knn / D))))
s = w * s_star
  1. 接着
    - 计算权重 w:权重 w 是基于 m_testm_star 的 k-NN 距离的函数,权重的计算反映了 m_test 相对于这些 k-NN 的异常程度。
    - 计算最终分数 s:将权重 w 应用到 s_star 上,得到最终的异常分数 s。这个分数是加权后的结果,考虑了 m_test 与其最近邻以及 k-NN 的关系。
  • 分数图生成
    • 通过调整最小距离值= min_val的形状(1,1,28,28)并双线性插值到原始图像大小(1,1,224,224)来生成分数图(s_map)。
    • 对分数图应用高斯模糊以平滑结果。
      先除以其中的最大值,经过高斯滤波后再乘回来这个最大值1,224,224
self.image_preds.append(s.numpy())
# 110个ndarray数值
self.image_labels.append(label)
# 110个ndarray数值
self.pixel_preds.extend(s_map.flatten().numpy())
# 5519360个数值
self.pixel_labels.extend(mask.flatten().numpy())
# 5519360个数值
self.predictions.append(s_map.detach().cpu().squeeze().numpy())
# 110个224,224
self.gts.append(mask.detach().cpu().squeeze().numpy())
# 110个224,224
ifpcd is not None:
    self.pcds.append(pcd)
    # 110个224,224,3
if img is not None:
    self.imgs.append(img)
    # 110个224,224,3
calculate_metrics

将上面的preds和labels拼接后
依然是调用sklearn直接计算图级、像素级auc
对于pro
至于pro则是和shape-guided一模一样

结果

因为跑preprocess_dataset.sh的时候中断过,所以干脆就用SG去背景的结果直接做npy了

(cpmf) pengpeng@pengpeng-X79:/media/pengpeng/新加卷/CPMF$ sh preprocess_dataset.sh
processing bagel...
Processed 50 tiff files... using 239.85 s...
Processed 100 tiff files... using 471.24 s...
Processed 150 tiff files... using 686.88 s...
Processed 200 tiff files... using 894.38 s...
Processed 250 tiff files... using 1099.75 s...
Processed 300 tiff files... using 1315.65 s...
Processed 350 tiff files... using 1528.68 s...
processing cable_gland...
Processed 50 tiff files... using 72.64 s...
Processed 100 tiff files... using 137.83 s...
Processed 150 tiff files... using 209.63 s...
Processed 200 tiff files... using 282.30 s...
Processed 250 tiff files... using 345.21 s...
Processed 300 tiff files... using 418.30 s...
processing carrot...
Processed 50 tiff files... using 78.65 s...
Processed 100 tiff files... using 157.95 s...
Processed 150 tiff files... using 233.61 s...
Processed 200 tiff files... using 313.42 s...
Processed 250 tiff files... using 389.71 s...
Processed 300 tiff files... using 471.55 s...
Processed 350 tiff files... using 555.39 s...
Processed 400 tiff files... using 641.18 s...
processing cookie...
Processed 50 tiff files... using 144.19 s...
Processed 100 tiff files... using 283.06 s...
Processed 150 tiff files... using 425.96 s...
Processed 200 tiff files... using 564.99 s...
Processed 250 tiff files... using 709.09 s...
Processed 300 tiff files... using 849.64 s...
processing dowel...
Processed 50 tiff files... using 55.66 s...
Processed 100 tiff files... using 111.77 s...
Processed 150 tiff files... using 164.40 s...
Processed 200 tiff files... using 216.80 s...
Processed 250 tiff files... using 280.02 s...
Processed 300 tiff files... using 334.62 s...
Processed 350 tiff files... using 391.36 s...
Processed 400 tiff files... using 443.62 s...
processing foam...
Processed 50 tiff files... using 246.73 s...
Processed 100 tiff files... using 664.31 s...
Processed 150 tiff files... using 1106.58 s...
Processed 200 tiff files... using 1415.25 s...
Processed 250 tiff files... using 1696.61 s...
Processed 300 tiff files... using 1963.43 s...
processing peach...
Processed 50 tiff files... using 115.77 s...
Processed 100 tiff files... using 231.24 s...
Processed 150 tiff files... using 344.81 s...
Processed 200 tiff files... using 461.54 s...
Processed 250 tiff files... using 573.14 s...
Processed 300 tiff files... using 678.64 s...
Processed 350 tiff files... using 789.82 s...
Processed 400 tiff files... using 907.43 s...
Processed 450 tiff files... using 1019.35 s...
processing potato...
Processed 50 tiff files... using 100.92 s...
Processed 100 tiff files... using 205.66 s...
Processed 150 tiff files... using 311.39 s...
Processed 200 tiff files... using 404.55 s...
Processed 250 tiff files... using 494.81 s...
Processed 300 tiff files... using 591.18 s...
Processed 350 tiff files... using 687.07 s...
Processed 400 tiff files... using 782.30 s...
processing rope...
Processed 50 tiff files... using 90.47 s...
Processed 100 tiff files... using 184.43 s...
Processed 150 tiff files... using 277.25 s...
Processed 200 tiff files... using 368.51 s...
Processed 250 tiff files... using 462.17 s...
Processed 300 tiff files... using 549.03 s...
Processed 350 tiff files... using 639.65 s...
processing tire...
Processed 50 tiff files... using 119.31 s...
Processed 100 tiff files... using 246.63 s...
Processed 150 tiff files... using 370.41 s...
Processed 200 tiff files... using 494.82 s...
Processed 250 tiff files... using 620.37 s...
Processed 300 tiff files... using 749.32 s...
(cpmf) pengpeng@pengpeng-X79:/media/pengpeng/新加卷/CPMF$ python run_exp.py
exec python main.py --category bagel --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category cable_gland --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category carrot --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category cookie --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category dowel --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category foam --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category peach --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category potato --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category rope --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category tire --n-views 27 --no-fpfh False --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27_fpfh --use-rgb False --backbone resnet18
exec python main.py --category bagel --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category cable_gland --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category carrot --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category cookie --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category dowel --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category foam --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category peach --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category potato --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category rope --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
exec python main.py --category tire --n-views 27 --no-fpfh True --data-path mvtec_multiview --exp-name UNIFORM_resnet18_27 --use-rgb False --backbone resnet18
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: bagel
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class bagel

resnet18
Downloading: "https://download.pytorch.org/models/resnet18-5c106cde.pth" to /home/pengpeng/.cache/torch/hub/checkpoints/resnet18-5c106cde.pth
2024-03-20 20:04:02.686 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/bagel/train
Extracting train features for class bagel: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 244/244 [06:43<00:00,  1.65s/it]
   Fitting random projections. Start dim = torch.Size([191296, 481]).
   DONE.                 Transformed dim = torch.Size([191296, 300]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19128/19128 [00:21<00:00, 870.59it/s]
2024-03-20 20:11:12.107 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/bagel/test
Extracting test features for class bagel: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 110/110 [02:58<00:00,  1.62s/it]
Class: bagel, Image ROCAUC: 0.9809, Pixel ROCAUC: 0.9860, AU-PRO: 0.9591
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: cable_gland
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class cable_gland

resnet18
2024-03-20 20:14:22.514 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cable_gland/train
Extracting train features for class cable_gland: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 223/223 [04:00<00:00,  1.08s/it]
   Fitting random projections. Start dim = torch.Size([174832, 481]).
   DONE.                 Transformed dim = torch.Size([174832, 298]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17482/17482 [00:18<00:00, 933.17it/s]
2024-03-20 20:18:45.157 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cable_gland/test
Extracting test features for class cable_gland: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 108/108 [02:44<00:00,  1.52s/it]
Class: cable_gland, Image ROCAUC: 0.8889, Pixel ROCAUC: 0.9865, AU-PRO: 0.9455
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: carrot
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class carrot

resnet18
2024-03-20 20:21:41.779 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/carrot/train
Extracting train features for class carrot: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 286/286 [04:52<00:00,  1.02s/it]
   Fitting random projections. Start dim = torch.Size([224224, 481]).
   DONE.                 Transformed dim = torch.Size([224224, 304]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22421/22421 [00:30<00:00, 739.51it/s]
2024-03-20 20:27:10.404 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/carrot/test
Extracting test features for class carrot: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 159/159 [03:11<00:00,  1.21s/it]
Class: carrot, Image ROCAUC: 0.9896, Pixel ROCAUC: 0.9973, AU-PRO: 0.9793
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: cookie
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class cookie

resnet18
2024-03-20 20:30:35.020 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cookie/train
Extracting train features for class cookie: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [05:00<00:00,  1.43s/it]
   Fitting random projections. Start dim = torch.Size([164640, 481]).
   DONE.                 Transformed dim = torch.Size([164640, 296]).
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16463/16463 [00:16<00:00, 1001.53it/s]
2024-03-20 20:35:55.187 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cookie/test
Extracting test features for class cookie: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 131/131 [03:30<00:00,  1.61s/it]
Class: cookie, Image ROCAUC: 0.9913, Pixel ROCAUC: 0.9268, AU-PRO: 0.8701
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: dowel
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class dowel

resnet18
2024-03-20 20:39:38.940 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/dowel/train
Extracting train features for class dowel: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 288/288 [05:14<00:00,  1.09s/it]
   Fitting random projections. Start dim = torch.Size([225792, 481]).
   DONE.                 Transformed dim = torch.Size([225792, 304]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22578/22578 [00:30<00:00, 736.22it/s]
2024-03-20 20:45:30.455 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/dowel/test
Extracting test features for class dowel: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 130/130 [02:59<00:00,  1.38s/it]
Class: dowel, Image ROCAUC: 0.9575, Pixel ROCAUC: 0.9684, AU-PRO: 0.8977
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: foam
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class foam

resnet18
2024-03-20 20:48:44.038 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/foam/train
Extracting train features for class foam: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 236/236 [05:22<00:00,  1.37s/it]
   Fitting random projections. Start dim = torch.Size([185024, 481]).
   DONE.                 Transformed dim = torch.Size([185024, 299]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 18501/18501 [00:20<00:00, 901.44it/s]
2024-03-20 20:54:30.851 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/foam/test
Extracting test features for class foam: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [02:40<00:00,  1.61s/it]
Class: foam, Image ROCAUC: 0.8069, Pixel ROCAUC: 0.9290, AU-PRO: 0.7273
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: peach
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class peach

resnet18
2024-03-20 20:57:23.544 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/peach/train
Extracting train features for class peach: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 361/361 [07:00<00:00,  1.16s/it]
   Fitting random projections. Start dim = torch.Size([283024, 481]).
   DONE.                 Transformed dim = torch.Size([283024, 309]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28301/28301 [00:46<00:00, 605.64it/s]
2024-03-20 21:05:16.824 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/peach/test
Extracting test features for class peach: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 132/132 [03:13<00:00,  1.47s/it]
Class: peach, Image ROCAUC: 0.9891, Pixel ROCAUC: 0.9974, AU-PRO: 0.9798
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: potato
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class potato

resnet18
2024-03-20 21:08:43.219 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/potato/train
Extracting train features for class potato: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [04:54<00:00,  1.02it/s]
   Fitting random projections. Start dim = torch.Size([235200, 481]).
   DONE.                 Transformed dim = torch.Size([235200, 305]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23519/23519 [00:32<00:00, 720.57it/s]
2024-03-20 21:14:15.539 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/potato/test
Extracting test features for class potato: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 114/114 [02:19<00:00,  1.22s/it]
Class: potato, Image ROCAUC: 0.9610, Pixel ROCAUC: 0.9975, AU-PRO: 0.9810
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: rope
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class rope

resnet18
2024-03-20 21:16:46.560 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/rope/train
Extracting train features for class rope: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 298/298 [05:11<00:00,  1.05s/it]
   Fitting random projections. Start dim = torch.Size([233632, 481]).
   DONE.                 Transformed dim = torch.Size([233632, 305]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23362/23362 [00:32<00:00, 713.06it/s]
2024-03-20 21:22:37.067 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/rope/test
Extracting test features for class rope: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 101/101 [01:54<00:00,  1.14s/it]
Class: rope, Image ROCAUC: 0.9783, Pixel ROCAUC: 0.9958, AU-PRO: 0.9610
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: False
use_rgb: False
exp_name: UNIFORM_resnet18_27_fpfh
category: tire
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27_fpfh 


Running on class tire

resnet18
2024-03-20 21:24:43.435 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/tire/train
Extracting train features for class tire: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [03:49<00:00,  1.09s/it]
   Fitting random projections. Start dim = torch.Size([164640, 481]).
   DONE.                 Transformed dim = torch.Size([164640, 296]).
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16463/16463 [00:16<00:00, 1002.03it/s]
2024-03-20 21:28:52.566 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/tire/test
Extracting test features for class tire: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 112/112 [02:26<00:00,  1.30s/it]
Class: tire, Image ROCAUC: 0.9632, Pixel ROCAUC: 0.9960, AU-PRO: 0.9771
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: bagel
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class bagel

resnet18
2024-03-20 21:31:30.962 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/bagel/train
Extracting train features for class bagel: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 244/244 [05:18<00:00,  1.31s/it]
   Fitting random projections. Start dim = torch.Size([191296, 448]).
   DONE.                 Transformed dim = torch.Size([191296, 300]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19128/19128 [00:21<00:00, 875.04it/s]
2024-03-20 21:37:16.900 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/bagel/test
Extracting test features for class bagel: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 110/110 [02:33<00:00,  1.40s/it]
Class: bagel, Image ROCAUC: 0.9401, Pixel ROCAUC: 0.9734, AU-PRO: 0.9252
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: cable_gland
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class cable_gland

resnet18
2024-03-20 21:40:03.036 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cable_gland/train
Extracting train features for class cable_gland: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 223/223 [03:51<00:00,  1.04s/it]
   Fitting random projections. Start dim = torch.Size([174832, 448]).
   DONE.                 Transformed dim = torch.Size([174832, 298]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17482/17482 [00:18<00:00, 949.08it/s]
2024-03-20 21:44:17.350 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cable_gland/test
Extracting test features for class cable_gland: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 108/108 [01:56<00:00,  1.08s/it]
Class: cable_gland, Image ROCAUC: 0.8670, Pixel ROCAUC: 0.9844, AU-PRO: 0.9394
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: carrot
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class carrot

resnet18
2024-03-20 21:46:25.412 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/carrot/train
Extracting train features for class carrot: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 286/286 [04:40<00:00,  1.02it/s]
   Fitting random projections. Start dim = torch.Size([224224, 448]).
   DONE.                 Transformed dim = torch.Size([224224, 304]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22421/22421 [00:30<00:00, 737.23it/s]
2024-03-20 21:51:42.367 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/carrot/test
Extracting test features for class carrot: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 159/159 [02:46<00:00,  1.05s/it]
Class: carrot, Image ROCAUC: 0.9141, Pixel ROCAUC: 0.9939, AU-PRO: 0.9691
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: cookie
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class cookie

resnet18
2024-03-20 21:54:42.836 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cookie/train
Extracting train features for class cookie: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [04:42<00:00,  1.34s/it]
   Fitting random projections. Start dim = torch.Size([164640, 448]).
   DONE.                 Transformed dim = torch.Size([164640, 296]).
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16463/16463 [00:16<00:00, 1002.57it/s]
2024-03-20 21:59:45.738 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/cookie/test
Extracting test features for class cookie: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 131/131 [03:05<00:00,  1.42s/it]
Class: cookie, Image ROCAUC: 0.9736, Pixel ROCAUC: 0.9159, AU-PRO: 0.8405
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: dowel
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class dowel

resnet18
2024-03-20 22:03:04.188 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/dowel/train
Extracting train features for class dowel: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 288/288 [04:53<00:00,  1.02s/it]
   Fitting random projections. Start dim = torch.Size([225792, 448]).
   DONE.                 Transformed dim = torch.Size([225792, 304]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22578/22578 [00:30<00:00, 734.00it/s]
2024-03-20 22:08:36.172 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/dowel/test
Extracting test features for class dowel: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 130/130 [02:30<00:00,  1.16s/it]
Class: dowel, Image ROCAUC: 0.9708, Pixel ROCAUC: 0.9663, AU-PRO: 0.8917
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: foam
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class foam

resnet18
2024-03-20 22:11:19.804 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/foam/train
Extracting train features for class foam: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 236/236 [05:01<00:00,  1.28s/it]
   Fitting random projections. Start dim = torch.Size([185024, 448]).
   DONE.                 Transformed dim = torch.Size([185024, 299]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 18501/18501 [00:20<00:00, 902.75it/s]
2024-03-20 22:16:46.604 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/foam/test
Extracting test features for class foam: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [02:20<00:00,  1.40s/it]
Class: foam, Image ROCAUC: 0.7931, Pixel ROCAUC: 0.9347, AU-PRO: 0.7529
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: peach
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class peach

resnet18
2024-03-20 22:19:19.228 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/peach/train
Extracting train features for class peach: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 361/361 [06:32<00:00,  1.09s/it]
   Fitting random projections. Start dim = torch.Size([283024, 448]).
   DONE.                 Transformed dim = torch.Size([283024, 309]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28301/28301 [00:46<00:00, 603.65it/s]
2024-03-20 22:26:45.525 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/peach/test
Extracting test features for class peach: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 132/132 [02:42<00:00,  1.23s/it]
Class: peach, Image ROCAUC: 0.9713, Pixel ROCAUC: 0.9939, AU-PRO: 0.9697
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: potato
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class potato

resnet18
2024-03-20 22:29:40.834 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/potato/train
Extracting train features for class potato: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [04:55<00:00,  1.02it/s]
   Fitting random projections. Start dim = torch.Size([235200, 448]).
   DONE.                 Transformed dim = torch.Size([235200, 305]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23519/23519 [00:33<00:00, 705.99it/s]
2024-03-20 22:35:16.154 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/potato/test
Extracting test features for class potato: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 114/114 [02:03<00:00,  1.08s/it]
Class: potato, Image ROCAUC: 0.7816, Pixel ROCAUC: 0.9915, AU-PRO: 0.9664
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: rope
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class rope

resnet18
2024-03-20 22:37:31.928 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/rope/train
Extracting train features for class rope: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 298/298 [04:54<00:00,  1.01it/s]
   Fitting random projections. Start dim = torch.Size([233632, 448]).
   DONE.                 Transformed dim = torch.Size([233632, 305]).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23362/23362 [00:32<00:00, 711.97it/s]
2024-03-20 22:43:06.452 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/rope/test
Extracting test features for class rope: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 101/101 [01:54<00:00,  1.13s/it]
Class: rope, Image ROCAUC: 0.9434, Pixel ROCAUC: 0.9946, AU-PRO: 0.9573
=========================================
data_path: mvtec_multiview
n_views: 27
no_fpfh: True
use_rgb: False
exp_name: UNIFORM_resnet18_27
category: tire
root_dir: ./results
backbone: resnet18
draw: False
=========================================

 UNIFORM_resnet18_27 


Running on class tire

resnet18
2024-03-20 22:45:13.661 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/tire/train
Extracting train features for class tire: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [03:36<00:00,  1.03s/it]
   Fitting random projections. Start dim = torch.Size([164640, 448]).
   DONE.                 Transformed dim = torch.Size([164640, 296]).
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16463/16463 [00:16<00:00, 1004.21it/s]
2024-03-20 22:49:11.116 | INFO     | data.mvtec3d_cpmf:__init__:41 - img path: mvtec_multiview/tire/test
Extracting test features for class tire: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 112/112 [02:08<00:00,  1.15s/it]
Class: tire, Image ROCAUC: 0.7241, Pixel ROCAUC: 0.9828, AU-PRO: 0.9414
(cpmf) pengpeng@pengpeng-X79:/media/pengpeng/新加卷/CPMF$ 

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 18
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值