[Solved] leaf disease detection using keras
-
@sreu13 Yup
-
Could you please follow my steps:
- Uninstall your current Python 3.7 version
- Install Python 3.6.5
- If you are using spyder editor make a change to vscode.
- Go to integrated terminal of vscode and create a virtual environment
python -m venv venv
- Activate your virtual environment
.\venv\Scripts\activate
- Create a requirements.txt over your current working directory. Contents for requirements.txt given below:
h5py==2.8.0 imutils==0.5.1 Keras==2.2.4 Keras-Applications==1.0.6 Keras-Preprocessing==1.0.5 kiwisolver==1.0.1 matplotlib==3.0.2 numpy==1.15.3 opencv-contrib-python==3.4.3.18 Pillow==5.3.0 PyWavelets==1.0.1 scikit-image==0.14.1 scikit-learn==0.20.0 scipy==1.1.0 six==1.11.0 sklearn==0.0 tensorboard==1.12.0 tensorflow==1.12.0 termcolor==1.1.0 toolz==0.9.0
- Then install necessary packages using requirements.txt file
pip install -r requirements.txt
- Then run your code within this venv and say what happened as reply here.
-
@SuperGops
i also have another pickle file "label_transform", which I got as an output from referring the initial code from gaggle, is there any use of this file?label_binarizer = LabelBinarizer() image_labels = label_binarizer.fit_transform(label_list) pickle.dump(label_binarizer,open('label_transform.pkl', 'wb')) n_classes = len(label_binarizer.classes_)
Kaggle >https://www.kaggle.com/emmarex/plant-disease-detection-using-keras/data
-
@arunksoman
i'll follow this proceedure, but would I be able to deploy this code in raspberry pi 4? -
@sreu13 As the @SuperGops says you have to use fit_transform. It can be implemented on Raspberry Pi 4. But if it slows down your pi you have use multiprocessing as well as threads to improve that.
-
@arunksoman
by multiprocessing, do you mean to use multilabel binarizer, if yes , then I have already used it during the training process.
@SuperGops , fit_transform has also been used in the code prior to using label_binarizer. -
@sreu13 I didn't mean that. I said if you are trying to run your code on RasPi4 or any other version of RasPi, you have to do some optimization on the code for better performance. Then Multiprocessing and threading Module comes into the picture.
-
@arunksoman
i followed your proceedure to and installed the requirements.txt file
after running the code, I got the following errorFile "C:\Users\admin\Anaconda3\envs\test2\lib\site-packages\scipy\special\basic.py", line 15, in <module>
from ._ufuncs import (ellipkm1, mathieu_a, mathieu_b, iv, jv, gamma,ImportError: cannot import name 'ellipkm1'
-
@sreu13 I didn't tell you to install anything via anaconda package manager. You have to uninstall those things first and install python 3.6.5. It was the first step.You have to read things carefully before executing anything.
-
@sreu13 how is the progress?