Open AbinJilson opened 2 years ago
when I was trying to run the model in my custom weights.I'm getting this error
File "C:\Users\acer\.spyder-py3\metallic surface defect detection\3_onnx_cpu_detec.py", line 31, in detect img = img.reshape(1, 3, img_size[0], img_size[1]) ValueError: cannot reshape array of size 692224 into shape (1,3,416,416)
You need to preprocess the image and then to detect it because the image has four channels. You should convert RGBA into RGB. 692224 equals to 4164164(RGBA).
when I was trying to run the model in my custom weights.I'm getting this error