Data Science & Machine Learning Project - Part 6 Flask Server | Image Classification
HTML-код
- Опубликовано: 27 авг 2024
- Python flask is a light weight web server. In this video, we will write a flask server that will use the trained model and perform image classification. UI will talk to this backend server and perform image classification task for our sports person identification project. At the end of this video you will have fully functioning python flask server or backend ready that UI can talk to. In next video we will write UI or front end website for our project.
Code: github.com/cod...
Special thanks to,
Debjyoti Paul (Amazon Data Scientist): For help with entire project
Do you want to learn technology from me? Check codebasics.io/ for my affordable video courses.
Website: codebasics.io/
Facebook: / codebasicshub
Twitter: / codebasicshub
Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
i am getting error :No module named 'wavelet
Your videos are an incredible step toward equal access of education. This is social justice in action. I deeply appreciate your videos and want to thank you from the bottom of my heart. I have not commented often, but I have watched probably half of all of your videos and it has certainly been life changing. I intend to introduce this subject matter inside the classroom I teach.
Sir, so much inspired after reading the article on you (in TimeOfIndia) on how you were and how you are now contributing to this Field. Kudos to your spirit...Much love!
share link if u have.
Next Video: ruclips.net/video/Gs9t6b5wpTg/видео.html
Data Science Project | Sports Celebrity Image Classification: ruclips.net/video/qWXXHjV3JHI/видео.html
Machine Learning & Data Science Project | Real Estate Price Prediction Project: ruclips.net/video/rdfbcdP75KI/видео.html
Learn data science for beginners (How to learn data science for free)?: ruclips.net/video/Vn_mmOuQkSA/видео.html
Thank you, this is very important to see how you mix and wrap everything together.
Thank you for doing this, man! You're helping a lot of people out here!
Great !! Your explanation and make us to understand the concept is very very clear , thank you
31:45 mine detected Anushka Sharma as Maria Sharapova :-) The model is so funny.
Thank You Sir for all your Dedication and Hardwork. Lots of love from Pakistan.
I am really enjoying it for sure.... super thank you :)) just want to keep commenting to value your knowledge sharing
Thanks a lot for such a good extent.. it helps a beginners too much,,. Great work keep carrying on!!!
You are really doing awesome brother. Please upload Deep Learning Tutorial series with that kind of fabulous end to end project.. God bless you.
You are great bro your teaching is ulitimate
You are doing a great job and I have learnt a lot from your tutorials. Keep doing the same
Thank you so much for end to end project. Please continue doing such projects...
Thankyou sir, for the amazing tutorial
executed code upto part 5 . But this video code looks like a *BIG PROJECT* :) .. _it will take more time .. i will do for great results_
Good luck jagan. I like your enthusiasm and passion Buddy
Hello Sir, Please make more end to end projects like this.
sure
Flawless teaching !🙏
Thank you for the kind words!
More projects please, you are my Angel bro
Sir when i run model its giving me blank output. Why? I TRIED WITH MANY PICTURES.
Great 👍
Great work.
great work sir
Great job
Sir,While Running Util.py the code was not running as it is showing some error in pickle and unpickle and also giving warnings for pickle version..
Same problem .Did you solve it?
its owesome
Hi sir, I used SVM instead of Logistic Regression that perform well in prediction here.
i am getting this error:
FileNotFoundError: [Errno 2] No such file or directory: './artifacts/class_dictionary.json'
when running util.py
you need to explicitly copy that file from model directory to artifacts directory.
@@codebasics yup... you are right..big thank you for your reply :))
can u tell me how u did that i m getting same error
@@elroyrebello3073 did you find any solution??
@@kushagraporwal4591 simple read as a raw string. instead of './artifacts/class_dictionary.json' use r'./artifacts/class_dictionary.json'
really helpfull
Hi Sir, I am receiving "AttributeError: 'SVC' object has no attribute '_probA'. Did you mean: 'probA_'?" this error while running the util.py. I tried checking the error but nothing worked. Request your help here.
@21:18 please make sure that your base64 string format is valid to get the desired results :)
valid base64 string format
data:image/image_type;base64,iVBORw0KGgoAAAANSUhEUgAA... (base64-encoded data continues)
When we print the loading artefacts done... It's giving me an empty list.
Could someone please help me with that?
I have a problem.
self.break_ties and self.decision_function_shape == 'ovo':
AttributeError: 'SVC' object has no attribute 'break_ties'. I dont know why. please give me a suggestion thanks
Thank u sir...
Thanks a lot sirr.
please the function def classify_image(image_base64_data, file_path=None): is not working for me
Thanks sir for this awesome video tutorial.
Please guide us on which programming is good out of Flask Vs Django.. i tried doing research but most of them scenario i found DJango as one of the best over Flask. Not sure if i missed any.
Please help to understand.
Also please have a tutorial how to make this website Productionize.
c:\Users\hp\.vscode\python\image_classification\server\util.py "
loading saved artifacts...start
loading saved artifacts....done
[ ] . I got this result , even i tried with different images . So how can i solve this problem??
same issue bro were you able to solve that problem ?
thank you so much sir it's very helpful . Can that code use for the flutter application?
why my model is returning empty list???
even i tried with cropped faces which was used for model traiining..
please help
@@HarshPatel-iy5qe No bro I didn't got yet so I leaved this project and started learning opencv first, here they are just copying and pasting and not explaining the things..
In my case the problem was that I supplied the model with picture sharapova2 jpg where there are no eyes on the photo, therefore the model could not classify it and returned []. I retried with sharapova1 jpg and it worked - model returned [1].
@@IgorKozarchuk same problem here. please tell me the solution
@@aatkafaryal1199 Just try with another image where 2 eyes can be clearly seen. Empty array may mean that model could not classify image.
@@IgorKozarchukThe problem is solved now. I was using wrong harcascade feature for face. So I changed that now the model is working fine.
Very helpful tutorials. thank you
403 error! can anyone help please..
You are G R E A T!
Pls implement this project with dockers and Kubernetes @ dhawal pls
Please do this project using Deep Learning too.
ModuleNotFoundError: No module named 'sklearn.preprocessing.data'...
I installed pip install scikit-learn...but this error is asking a specific version of sklearn and python....May I plz know that ?
Hello. Did you solve it?
@@JOXAVLOGS I am also stuck in this problem. Did you solve it?
@@tusharchawla1440 plz help is it solved
@@nikhilshah1382 no it is not solved
Hi. Sir
I am getting. this error , I was just trying to. run your code,
What is class dictionary?
Sir where you have uploaded your tensorflow series i wanted to learn from that please let me know 😭😭
I have few deep learning tutorials. Just search deep learning codebasics in RUclips. However I am going to start new deep learning series with best quality content. Stay tuned
While Running util.py in pycharm, getting errror like
ModuleNotFoundError: No module named 'sklearn.preprocessing.data' in pickle.py file
Can You please solve this issue
bro did you solve the issue
@@satwikvarma2804 same problem
are u able to solve ?
@@satwikvarma2804 are u able to solve ?
@@bhupeshdewangan8461 1)install python 3.6.1 and set that as your interpreter in pycharm
2) install module called scikit-learn of version 0.20.3 (open cmd and type "pip install scikit-learn==0.20.3")
import pywt
ModuleNotFoundError: No module named 'pywt'
While. I was. tying to love using.pycharm. ,getting this error
pip install PyWavelets
Good Evening sir @codebasics
i am having an error with how can i resolve when i try to install it gives another error as
ERROR: Could not find a version that satisfies the requirement pywt (from versions: none)
ERROR: No matching distribution found for pywt
WARNING: You are using pip version 21.3.1; however, version 23.1.2 is available.
You should consider upgrading via the 'D:\JupyterTest\Intro to Numpy\Image Classification\venv\Scripts\python.exe -m pip install --upgrade pip' command.
import pywt
can you please look into this error and how can I rectify it.
remove any versions that is mentioned in requirements.txt file keep only PyWavelets
opencv-python
seaborn
flask
joblib like this
it shows the error ModuleNotFoundError: No module named 'sklearn.preprocessing.data' can anyone help
Hello, Did you solve it?
I am getting this error
import pywt
ModuleNotFoundError: No module named 'pywt'
can. any one help plz?
@@SunilKumar-jw1lv pip install PyWavelets ,install latest one
encoded_data = b64str.split(",")[1]
IndexError: list index out of range
any ideas? i just used another base64 web page transformer and another image
I also have same problem
Did you solved?
@@bhaveshkumar3578 There are two ways of solving this, by either using the same website that he used to convert the image (www.base64-image.de/) or by using another converter of your choice AND modifying the "util.py" file. For the latter case, in the "util.py" file, line 60, where it says: "encoded_data = b64str.split(',')[1]", rewrite it as: "encoded_data = b64str". The reason for this error is that the web converter that he used generates a string with two parts divided by a comma ",". The first part contains " data:image/jpeg;base64" which is useless and should be ignored and the second part is the image binary data per se which is what we want, and he wrote the code to accommodate this fact by splitting them up and selecting only the second part, thus "b64str.split(',')[1]". Hopefully this was clear enough. Best of luck!
@@felipe7703 Thanks bro I will try to solve it
THANKSSSS!!!!
Video quality was not good
Thanky you very much dhaval for making a real time end to end machine learning project with classification. I have implement the code upto 6 th video in my pycharm but it will not give the classification output.I have tried with your code which you have uploaded on your github profile and also i have tried with my self which you explanied small code of snippet for Flask server but when i run the util.py file its give an error.
Below i getting the error.
Traceback (most recent call last):
File "D:/CelebrityFaceRecognition/server/util.py", line 91, in
load_saved_artifacts()
File "D:/CelebrityFaceRecognition/server/util.py", line 50, in load_saved_artifacts
__model = joblib.load(f)
File "C:\Users\Naresh\Anaconda3\lib\site-packages\joblib
umpy_pickle.py", line 575, in load
obj = _unpickle(fobj)
File "C:\Users\Naresh\Anaconda3\lib\site-packages\joblib
umpy_pickle.py", line 504, in _unpickle
obj = unpickler.load()
File "C:\Users\Naresh\Anaconda3\lib\pickle.py", line 1085, in load
dispatch[key[0]](self)
File "C:\Users\Naresh\Anaconda3\lib\pickle.py", line 1373, in load_global
klass = self.find_class(module, name)
File "C:\Users\Naresh\Anaconda3\lib\pickle.py", line 1423, in find_class
__import__(module, level=0)
File "C:\Users\Naresh\Anaconda3\lib\site-packages\sklearn\__init__.py", line 134, in
from .base import clone
File "C:\Users\Naresh\Anaconda3\lib\site-packages\sklearn\base.py", line 13, in
from .utils.fixes import signature
File "C:\Users\Naresh\Anaconda3\lib\site-packages\sklearn\utils\__init__.py", line 10, in
from .validation import (as_float_array,
File "C:\Users\Naresh\Anaconda3\lib\site-packages\sklearn\utils\validation.py", line 18, in
from ..utils.fixes import signature
File "C:\Users\Naresh\Anaconda3\lib\site-packages\sklearn\utils\fixes.py", line 144, in
from scipy.sparse.linalg import lsqr as sparse_lsqr # noqa
File "C:\Users\Naresh\Anaconda3\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in
from .isolve import *
File "C:\Users\Naresh\Anaconda3\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in
from .iterative import *
File "C:\Users\Naresh\Anaconda3\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 10, in
from . import _iterative
ImportError: DLL load failed: The specified module could not be found.
Process finished with exit code 1
does any one have get the output from util.py file then please help me to solve this proble.I aslo attached my email id : dholanaresh26@gmail.com. Thanks in advanced for helping to this tutorial.
i m getting the same problem
same problems I have tried with pycharm vscode ........ error error
@@JOXAVLOGS I am also getting same error.Did you solve it?
Don't teach packages as Machine Learning half the prople will not understand the under the hood logic of the packages are working understand the maths everyone pls 🙏🙏