
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn to build a deep learning model from scratch with OpenCV, Python, and YOLO, master computer vision and image processing, and create a car counting system through practical training.
Install Python on Windows by downloading from the official Python site, running the installer, and verifying with a hello world program.
Learn to install Jupyter Notebook on Windows using Anaconda, set up the Anaconda environment, launch Jupyter through Anaconda Navigator, and run a hello world Python snippet.
Explore how to create variables in Python by naming them and assigning values to store data, including string, integer, and float types, with rules: names cannot start with a number.
Explore numeric variable types in Python, creating integer and float variables, assigning values to variables like x, and checking types with the type function.
Master Python variable rules: names cannot start with a number, are case sensitive, and use underscores for multiword names.
Learn Python variable creation rules, including assigning multiple variables in one line with commas and the equal sign to hold different values, and printing their results.
Explore the string data type in Python by defining name and country as strings, using single, double, and triple quotes, and printing them to the console.
this lesson shows that variables are changeable after initialization, using x from 20 to 10 and name from 'Yilmaz' to 'Sam', with print statements to verify changes.
Learn to use the Python print function as the standard output tool, printing text with quotes, string variables, and understanding automatic newlines.
Learn how Python lists consolidate multiple data into a single list using square brackets, replacing many variables, and use indexing to access elements at zero-based positions.
Create a list with mixed data types (string, float, integer), access and print elements by index, modify values, and use list methods such as append and clear; lists are changeable.
This lesson teaches the standard input function in Python, showing how to assign a value to a variable using input, prompt the user with a message, and print the result.
Explore type conversions in Python by converting 4.5 to int and 5 to float using int() and float(), and verify types with type() while printing results.
Explore the importance of type conversions in Python by converting input strings to integers and floats to perform correct addition and prevent errors.
Learn how to create and use tuples in Python with parentheses, note their immutability, index-based access, and the index method, using fruit examples to compare with lists.
Learn about boolean logical data types in Python, creating boolean variables, true and false values, and using the bool function to test truth with non-empty vs empty lists.
Explore how logical conjunctions in Python combine multiple conditions with the and operator, returning true only when all conditions are true. See examples with comparisons and boolean results.
Explore boolean logic with and/or conjunctions and the not operator through practical code examples, showing how true and false outputs arise from multiple conditions.
Explore conditional structures in Python, learning how the if condition controls statement execution based on a true condition, using indentation and basic syntax.
Explore the if condition in Python, using equivalence with the two equal signs to compare x1 and x2, including true and false outcomes and indentation rules.
Learn to use Python if-else conditions to handle true and false states, demonstrate with variable checks, indentation, and else blocks to control program flow.
Learn how to control multiple conditional states in Python using if, elif, and else, with practical examples of checking values and printing results.
Explore the concept of loops in Python, including for and while loops, and how code repeats based on a determined condition.
Use the in structure to test membership in strings and lists with a for loop, returning true when a letter or value exists and false otherwise.
Discover how the for loop iterates over lists, tuples, dictionaries, sets, and strings to execute code for each element in Python, with examples using a numbers list.
Explore how the for loop works with the range function to access list elements via indexing, and learn practical examples using a names list.
Learn how to implement a while loop in Python, using conditions, indentation, and incrementing counters to control repeated execution and determine when the loop ends.
Explore how the while-else relationship works in Python by running a loop that prints hello three times, then executes an else block when the loop condition becomes false.
Learn how break and continue control loop flow in Python, using while and for loops to terminate or skip iterations.
Learn how to define and call functions in Python using def, pass parameters, and return values through hands-on examples like greetings and addition.
Master default parameters and parameter usage in Python functions by assigning default values, handling missing arguments, and calling parameters in flexible orders to avoid errors.
Explore how functions can return values in Python, contrast returning versus non-returning functions, and use return to enable arithmetic operations in main code with practical examples.
Explore arbitrary arguments in python using the asterisk to pass multiple values to one parameter, then sum them with a for loop in a simple add function.
Return multiple data from a single function by using comma-separated values, returning the addition and multiplication results from two parameters.
Learn how to define function parameters and pass a function as an argument. Build and call nested functions with greetings to demonstrate the output.
Learn to use lists inside functions by creating a function named addition, passing a list, iterating with a for loop, and summing elements to produce 15 as the result.
Learn how Python modules function as libraries to organize code and expose functions and variables. Import modules, access members with dot notation, and use help to discover pi and sqrt.
Explore how to work with Python modules by importing math module or specific functions, using dot notation or from-import, and manage memory and name errors when calling sqrt and power.
Master python modules by mastering import techniques and aliasing with as. Use from module import * to access functions like cos and pi, as shown with the math module.
Install PyCharm Community Edition and update the PATH. Create a new Python project with Python 3.9.6, write a Python file, and run it.
Install the OpenCV module in PyCharm using pip, import cv2 in a Python file, and verify the installation by printing the OpenCV version to confirm image processing readiness.
Read an image with OpenCV using cv2.imread, display it with cv2.imshow, and use cv2.waitKey to keep the window open until a key is pressed.
Learn to obtain an image's height, width, and channels with OpenCV's shape method in Python. Unpack image.shape into height, width, and channels to see color channels (3) vs grayscale (1).
Master image resizing with the cv2 resize function by loading an image with imread, applying a width-height tuple, and viewing results in original and resized windows via imshow and waitKey.
Crop a specific area of an image using Python and OpenCV by setting y1, y2, x1, x2 coordinates, reading with imread, and displaying with imshow and waitKey.
Learn drawing operations, including lines, circles, and rectangles, using coordinates for start and end points, and draw them with cv2.line on an image read by cv2.imread, then show with cv2.imshow.
Learn to draw a circle with OpenCV in Python by specifying the center and radius. Apply color and thickness settings using cv2.circle and display the result with cv2.imshow.
Learn to draw a green rectangle on a black image using OpenCV's rectangle function, specifying the beginning and ending points, color, and thickness. Display the result with imshow and waitKey.
Open a video using OpenCV's video capture, read frames in a loop, display them with imshow, and exit the program by pressing the esc key.
Convert an image to gray using the cvtColor function in Python OpenCV, reading with imread, converting BGR to gray, and displaying the original and gray images with imshow and waitKey.
Learn how to convert an image to HSV color format using OpenCV, enabling color tracking and saturation analysis with cv2.cvtColor and COLOR_BGR2HSV.
Learn how to convert a color image to grayscale and then to binary using cv2 threshold, highlighting single channel, 8-bit images, and the display of original and binary results.
Rotate an image using OpenCV by computing a rotation matrix with getRotationMatrix2D at the image center and applying warpAffine, demonstrating clockwise and counterclockwise rotation with different angles.
Learn how to rotate images in Python using the cv2 rotate method, applying rotate 180 and rotate 90 counterclockwise, and display the results.
Learn how the canny edge algorithm detects edges in images using OpenCV, including grayscale conversion, threshold tuning, and displaying original and canny images.
Learn to convert an image to negative by inverting colors using OpenCV's bitwise_not in Python, and display both the original and negative images with cv2 imread, imshow, and waitKey.
Apply a Gaussian filter with OpenCV to blur images using the GaussianBlur function, selecting odd kernel sizes and sigma values, and compare the original with the blurred result.
Learn how to reduce image noise with the median filter in Python using OpenCV, applying a kernel size and displaying original and filtered images with imshow.
Detect faces with OpenCV using Haar cascades and XML files. Build a Python script that loads the cascade, converts images to gray, runs detectMultiScale, and draws rectangles around faces.
Detect eyes in images by using the Haarcascade eye xml with a cascade classifier after face detection, applying detectMultiScale and drawing green rectangles around eyes.
Learn how a Python function places text on images by adding a colored background rectangle and optional border, implemented with OpenCV's image processing tools.
Create a put_text_rect function in Python with OpenCV that writes text on an image and draws a colored background rectangle, optionally bordered.
Create a put text function that draws an optional border around a rectangle and overlays text on an image using OpenCV. Return the updated image and the rectangle coordinates.
Create a function that draws a bounding box with corner lines on an image to highlight detected areas, using parameters x, y, width, height, L, t, TX, blue and white.
Compute the bounding box from bbox, draw a rectangle when TX is non-zero, and add corner lines to highlight the box, demonstrated with a logo.jpg example.
Create loops to process multiple detected objects from YOLO results, extract box coordinates and confidence scores, convert confidence to percentage, round, and normalize to 0–1.
Create an object list function by filtering detections with a confidence above 50%, extract bounding box coordinates x1,y1,x2,y2, convert to integers, and compute width, height, and center for tracking.
Learn to build an object list for YOLO by extracting class names from a boxed index, storing bbox, center, confidence, and class in a dictionary, and optionally drawing results.
Develop a stack images function that standardizes image sizes, computes the grid of rows and columns, and fills empty cells with blank images using copy and numpy.
Create a stacking images function that processes each image with a for loop, resizes with interpolation, converts grayscale to color, and stacks images horizontally and vertically into a merged board.
Learn to create training, validation, and test folders using the OS module, with structured YOLO and Pascal VOC formats, including images and labels.
Create a points_of_mouse function in OpenCV to collect left-click coordinates, form four-corner polygons, store them in polygons, and increment a counter for each rectangle.
Install essential modules in PyCharm for image processing and deep learning, including Ultralytics and OpenCV, configure Python interpreter, then prepare for building custom YOLO models for object detection.
Install the GPU-enabled PyTorch package to train models on Nvidia graphics cards using Python and pip on Windows, following PyTorch.org’s start locally instructions and installing via terminal.
Learn to build a Python data collection script for training a car detection model in a smart city project, saving labeled images with Ultralytics YOLO v8 nano and OpenCV.
Define the region of interest with coordinates for a 1280 by 720 image, initialize framecount, and start the camera stream using the video capture class with YOLO class names.
Guide to building a data collection loop with a while true loop for webcam frames, counting frames, tracking time for FPS, cropping ROI, and running YOLO on the ROI.
Iterate through the results from the YOLO model, extract each box's coordinates x1, y1, x2, y2 as integers, compute the confidence score, and identify the object class from class names.
Iterate through detected objects to filter by name, confidence, and area, draw bounding boxes with annotations on the image, and generate YOLO-formatted, normalized center coordinates and size.
Save images and labels only when a set number of objects are detected, using time-based filenames and YOLO-formatted labels with OpenCV.
Debug data collection for object detection by correcting coordinate calculations and image resizing. Ensure the spatial module stacks images with the correct source image and indexing.
Collect data by adjusting the total objects variable to detect multiple vehicles, gather varied webcam frames, and collect these examples to train our model more precisely.
Learn how a Python data cleaning script improves detections by filtering image formats, counting bounding boxes, and assigning per-class colors with OpenCV and numpy.
Learn to implement the drop boxes YOLO function that reads YOLO labels, converts center coordinates to image bounds, draws colored bounding boxes with class names, and returns the processed image.
Learn to draw bounding boxes on images using Pascal VOC XML annotations with the draw boxes VOC function, load images with OpenCV, parse XML, and label objects with colors.
Display, navigate, and manipulate images annotated in YOLO or VOC formats by loading from a folder, drawing bounding boxes, and stacking results in a grid configured by images per column.
Navigate through a set of images, process annotations in YOLO or VOC formats, and display detection data while using keyboard controls to move, delete, or revisit images.
Demonstrate Python main guard usage and run the yolo checker to display detection dataset samples, iterating through images with 0.5 scale and car class annotations in yolo format.
Clean the data to train a more accurate model by removing bad data and organizing images into a clean folder, then run the code, review the output, and delete images.
Split the dataset for YOLO training by creating a data.yml and organizing train, validation, and test sets with 70/20/10 ratios, and balance by shuffling unique names.
split data into train, validation, and test sets using a 70/20/10 ratio, configure YOLO format with one class car, and generate data.yml detailing paths for training a model.
Train a custom YOLO model using Ultralytics in Python by loading YOLOv8, specifying data.yml, 50 epochs, and 640 image size, then save the best weights as a custom model.
Test the yolo model with a python script that loads Ultralytics yolo, uses OpenCV, and configures camera id 2, 1280x720 resolution, and a 0.5 confidence threshold for car detection.
Set up an infinite loop to capture camera frames, run YOLO object detection with OpenCV in Python, display results, and debug visualization colors during testing.
Set up a car-detection project with OpenCV and YOLO in Python. Load the model, configure camera id, resolution 1280x720, and an 80% confidence threshold to recognize cars.
Implement a while true loop to continuously capture camera frames, apply YOLO car detection, compute parking occupancy, overlay available spaces, and display results until ESC is pressed.
This course is designed for anyone interested in pursuing a career in artificial intelligence and computer vision or looking to implement computer vision applications in their projects. In "Computer Vision Smart Systems: Python, YOLO, and OpenCV -1," we start with the fundamentals of computer vision and cover image processing techniques using the Python programming language and OpenCV library. Then, we advance to object detection and deep learning modeling using the YOLO (You Only Look Once) algorithm. Students will learn to build custom deep learning models from scratch, work with datasets, perform object detection, and apply these models in various projects.
Throughout the course, practical exercises are provided step-by-step along with theoretical knowledge, giving students the chance to apply what they've learned. Additionally, we address common challenges you may face and provide detailed solutions. Aimed at building skills from basic to intermediate levels, this course serves as a comprehensive guide for anyone interested in the field of computer vision. It empowers you to develop smart systems for your projects and enhances your expertise in this exciting domain.
"You are never too old to set another goal or to dream a new dream." - C.S.Lewis
"Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles begins with a single step" - Lao Tzu
You get the best information that I have compiled over years of trial and error and experience!
Best wishes,
Yılmaz ALACA