I’m sorry to hear the code is not working for you.
I test all code, images, datasets, etc. before I include them in a blog post and publish the code.
The most common reason code doesn’t work is development environment issues.
The good news is you never need to struggle with your dev environment again. That’s one of the reasons we include pre-configured Jupyter Notebooks for Google Colab inside PyImageSearch University.
These notebooks automatically configure themselves when you run them, ensuring you won’t have to deal with the headache of configuring your environment.