LeeWise9 / Segmentation-Based-Surface-Defect-Detection

This is a deep learning application project in the industrial field, intended to detect defects on the workpiece surface. The code is based on keras and runs on GPU.
79 stars 15 forks source link

How do you test KolektorSDD? #1

Open molyswu opened 4 years ago

molyswu commented 4 years ago

Hi,Tried to python test_model_up.py My data used KolektorSDD .

================================================================================================== Total params: 4,838,622 Trainable params: 4,835,006 Non-trainable params: 3,616


开始处理第 1 张图片... 2020-03-12 10:22:58.419945: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10 2020-03-12 10:22:58.642987: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7 第1例分类正确!耗时:3.6043s 开始处理第 2 张图片... 第2例分类正确!耗时:0.4295s 开始处理第 3 张图片... 第3例分类正确!耗时:0.4233s 开始处理第 4 张图片... 第4例分类正确!耗时:0.4182s 开始处理第 5 张图片... 第5例分类正确!耗时:0.4234s 开始处理第 6 张图片... 第6例分类错误!耗时:0.4298s Traceback (most recent call last): File "test_model_up.py", line 131, in plot_result(sort_list[i], result, delta_h, target_size) File "test_model_up.py", line 49, in plot_result imgs1[target_size[0]*k:,...] = array_img_reshape(fig_k, (target_size[0], delta_h)) ValueError: could not broadcast input array from shape (270,500,1) into shape (260,500,1)

LeeWise9 commented 4 years ago

I haven't encountered the problem you described. Please make sure you haven't changed the input shape. The problem is in the plot_Result function. Please check it.