일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- cv2
- 블록체인
- loss
- 세계사
- pyqt
- error
- numpy
- terminal
- Inference
- Training
- dtype
- 비트코인
- Perceptron
- opencv
- TFRecord
- DataSet
- keras
- TF
- itksnap
- deeplearning
- 브렉시트
- img
- 딥러닝
- 세계대전
- TensorFlow
- qtdesigner
- 유가 급등
- 유로화
- Python
- 퍼셉트론
- Today
- Total
목록분류 전체보기 (120)
활연개랑
Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: inference 를 하는 과정에서 predict 값을 구하기 위해 model에 x값을 넣어주었을 때 다음과 같은 오류가 발생하였습니다. x의 shape은 (300,400)이었으나, model로 들어갈 때 (batch, width,height, channel)형태로 들어가 주어야 하기 때문입니다. t_x = t_x.reshape(1, t_x.shape[0], t_x.shape[1], 1) pred = model(t_x) 위와 같이 reshape을 해주면 잘 들어갑니다!
tf.numpy_function을 사용할 때 dim 관련 오류가 날 수 있습니다. tf.numpy_function을 이미지에 사용할 경우 reshape이 필요하기 때문에 다음과 같이 reshape을 해주어야 합니다. image_shape = tf.shape(image) image = tf.numpy_function(definition(func), [image], tf.float32) image = tf.reshape(image, image_shape) 이렇게 reshape을 해주면 dimensipn오류를 해결할 수 있습니다.
model inference 과정에서 다음과 같은 오류가 발생했습니다. ValueError: Exception encountered when calling layer "epvs_conv" (type EPVS_CONV). Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (300, 400) Call arguments received: • inputs=tf.Tensor(shape=(300, 400), dtype=float32) 다음과 같은 오류가 발생한 이유는 shape이 맞지 않아서 입니다. 제가 만든 모델에는 dimension이 4인 input (bat..
eq_img = cv2.equalizeHist(img) 위와 같이 equalizehist를 하는 과정에서 아래와 같은 오류가 발생하였습니다. cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/histogram.cpp:3439: error: (-215:Assertion failed) _src.type() == CV_8UC1 in function 위 오류를 보니 대충 8bit이미지로 만들면 되는 것 같아 보입니다. 8bit 이미지로 만들어주기 위해서 astype으로 바로 바꿀 수도 있겠지만, 이미지를 제대로 살리기 위해서 normalize를 한 후 astype을 통해 8bit 정수형 이미지로 만들어주면 오류가 해결됩니다.
cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/histogram.cpp:3439: error: (-215:Assertion failed) _src.type() == CV_8UC1 in function 'equalizeHist'stackoverflow.com/questions/23660929/how-to-check-whether-a-jpeg-image-is-color-or-gray-scale-using-only-python-stdli 해당 오류가 나는 이유는 여러가지가 있습니다. 그 중 가장 주된 이유는 아래와 같습니다. 1. 이미지가 gray형태가 아니다. - bgr2gray 또는 rgb2gray 등을 통해 gray scale로 만들어 주어야 합니다...
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl. plt.imshow()를 실행하는 와중에 다음과 같은 오류가 발생하였습니다. 저는 현재 Linux Ubuntu20.04를 사용하고 있고, 위 문제는 우분투에서만 나타나는 오류로 확인됩니다.. QT5.15버전부터 호환이 안되는 것으로 보입니다. 따라서 $ Pip list|grep Qt 위 코드를 사용하여 Qt 리스트를 확인하고 모두 uninstall 시켜준 후에, $ pip install PyQt5==5.14.2..
_, bi_binary = cv2.threshold(roi_1, 0, 255, cv2.THRESH_BINARY) contours, hierarchy = cv2.findContours(bi_binary, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE) findcontours를 하기 위해 위 코드를 실행하는 과정에서 다음과 같은 오류가 발생하였습니다. cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/contours.cpp:195: error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1 images when mode..
다음 에러는 matplotlib에서 GUI 창에 plot을 띄우려고 하는데, GUI를 띄우기위한 plot 파이썬 모듈이 없을 때 나타납니다. UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. plt.show() 따라서, Qt5Agg, GTKAgg, Qt4Agg, 또는 pyqt5를 설치해서 다음과 같은 오류를 해결할 수 있습니다.