title: ImportError: cannot import name 'img_to_array' from 'keras.preprocessing.image'
body: <p>Im new here. I have problem with this code,</p>
  <pre><code>#Library
  import numpy as np
  import pickle
  import cv2
  from os import listdir
  from sklearn.preprocessing import LabelBinarizer
  from keras.models import Sequential
  from keras.layers import BatchNormalization
  from keras.layers.convolutional import Conv2D
  from keras.layers.convolutional import MaxPooling2D
  from keras.layers.core import Activation, Flatten, Dropout, Dense
  from keras import backend as K
  from keras.preprocessing.image import ImageDataGenerator
  from keras.optimizers import Adam
  from keras.preprocessing import image
  #from tensorflow.keras.preprocessing.image import img_to_array
  from keras.preprocessing.image import img_to_array
  from sklearn.preprocessing import MultiLabelBinarizer
  from sklearn.model_selection import train_test_split
  import matplotlib.pyplot as plt
  </code></pre>
  <p>I got an error</p>
  <p><a href="https://i.stack.imgur.com/6knhx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6knhx.png" alt="enter image description here" /></a></p>
  <p>this code is from <a href="https://github.com/marcosdhiman/leaf_disease_detection/blob/main/Leaf_Disease_Detection.ipynb" rel="nofollow noreferrer">github link</a></p>
  <p>Im using</p>
  <ol>
  <li>python 3.7.13</li>
  <li>tensorflow 2.9</li>
  <li>opencv 4.5.5</li>
  <li>keras 2.9.0</li>
  </ol>