Relative Content

Tag Archive for kerasextractreshapevalueerror

I am extracting the handwritten words from an image but getting error after following below code

[tag: Load and preprocess images] images = [] for image_path in image_paths: img = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE) img = cv2.resize(img, (128, 32)) images.append(img) images = np.array(images) / 255.0 images = np.expand_dims(images, axis=-1) ** # Add channel dimension for grayscale images** label_set = list(set(labels)) # Convert labels to a set and then a list label_to_index = {label: […]