Computer Vision Crash Course In PythonLearn the fundamentals of computer vision with Python—simple, practical, and beginner-friendly.
Course Overview - Start Here!
Overview
In the final video of the series, we’ll take our trained model and put it into action by making predictions on new images. You’ll also learn how to save and reload the model, ensuring that your hard work doesn’t need to be repeated for future use.
Here’s what you’ll learn:
By the end of this video, you’ll have a complete workflow for training, saving, and using a machine learning model in a practical scenario. This final step ties everything together, giving you the tools to apply what you’ve learned to your own projects. Let’s wrap it up!

In this video, we saved our trained model to disk using Python’s pickle library and reloaded it for use in predicting on custom images. This means that you can train your model once, and use it multiple times in different processes or different computers. We uploaded new images, preprocessed them to match the training data format, and used the model to make predictions.
However, we observed that the model's predictions on our own images were less accurate than on the test dataset. This is due to training-serving data skew: the images used for training don’t perfectly represent the images the model encounters during use. This discrepancy arises because the training dataset and real-world data often come from different sources with varying properties.
For example, when creating models for Axis cameras, it’s crucial to consider factors like lens warping, image quality, environmental lighting, and view angles, which can differ significantly from public datasets. Addressing this skew requires careful consideration of the data used for training to ensure the model performs well in real-world scenarios. There is often a need to collect your own data and add that to the training dataset.
By completing this video, you now have the tools to train, save, and deploy machine learning models, along with the insight to consider data-related challenges when applying models in practical applications.