Machine Learning with Python
68.4K subscribers
1.35K photos
110 videos
177 files
1.03K links
Learn Machine Learning with hands-on Python tutorials, real-world code examples, and clear explanations for researchers and developers.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
#YOLOv8 #ComputerVision #TrafficManagement #Python #AI #SmartCity

Lesson: Detecting Traffic Congestion in Road Lanes with YOLOv8

This tutorial will guide you through building a system to monitor traffic on a highway from a video feed. We'll use YOLOv8 to detect vehicles and then define specific zones (lanes) to count the number of vehicles within them, determining if a lane is congested.

---

#Step 1: Project Setup and Dependencies

We need to install ultralytics for YOLOv8 and opencv-python for video and image processing. numpy is also essential for handling the coordinates of our detection zones.

pip install ultralytics opencv-python numpy

Create a Python script (e.g., traffic_monitor.py) and import the necessary libraries.

import cv2
import numpy as np
from ultralytics import YOLO

# Hashtags: #Setup #Python #OpenCV #YOLOv8


---

#Step 2: Model Loading and Lane Definition

We'll load a pre-trained YOLOv8 model, which is excellent at detecting common objects like cars, trucks, and buses. The most critical part of this step is defining the zones of interest (our lanes) as polygons on the video frame. You will need to adjust these coordinates to match the perspective of your specific video.

You will also need a video file, for example, traffic_video.mp4.

# Load a pre-trained YOLOv8 model (yolov8n.pt is small and fast)
model = YOLO('yolov8n.pt')

# Path to your video file
VIDEO_PATH = 'traffic_video.mp4'

# Define the polygons for two lanes.
# IMPORTANT: You MUST adjust these coordinates for your video's perspective.
# Each polygon is a numpy array of [x, y] coordinates.
LANE_1_POLYGON = np.array([[20, 400], [450, 400], [450, 250], [20, 250]], np.int32)
LANE_2_POLYGON = np.array([[500, 400], [980, 400], [980, 250], [500, 250]], np.int32)

# Define the congestion threshold. If vehicle count > this, the lane is congested.
CONGESTION_THRESHOLD = 10

# Hashtags: #Configuration #AIModel #SmartCity


---

#Step 3: Main Loop for Detection and Counting

This is the core of our program. We will loop through each frame of the video, run vehicle detection, and then check if the center of each detected vehicle falls inside our predefined lane polygons. We will keep a count for each lane.

cap = cv2.VideoCapture(VIDEO_PATH)

while cap.isOpened():
success, frame = cap.read()
if not success:
break

# Run YOLOv8 inference on the frame
results = model(frame)

# Initialize vehicle counts for each lane for the current frame
lane_1_count = 0
lane_2_count = 0

# Process detection results
for r in results:
for box in r.boxes:
# Check if the detected object is a vehicle
class_id = int(box.cls[0])
class_name = model.names[class_id]

if class_name in ['car', 'truck', 'bus', 'motorbike']:
# Get bounding box coordinates
x1, y1, x2, y2 = map(int, box.xyxy[0])

# Calculate the center point of the bounding box
center_x = (x1 + x2) // 2
center_y = (y1 + y2) // 2

# Check if the center point is inside Lane 1
if cv2.pointPolygonTest(LANE_1_POLYGON, (center_x, center_y), False) >= 0:
lane_1_count += 1

# Check if the center point is inside Lane 2
elif cv2.pointPolygonTest(LANE_2_POLYGON, (center_x, center_y), False) >= 0:
lane_2_count += 1

# Hashtags: #RealTime #ObjectDetection #VideoProcessing

(Note: The code below should be placed inside the while loop of Step 3)

---

#Step 4: Visualization and Displaying Results
❀8
This media is not supported in your browser
VIEW IN TELEGRAM
This combination is perhaps as low as we can get to explain how the Transformer works

#Transformers #LLM #AI

https://t.iss.one/CodeProgrammer πŸ‘
❀2πŸ”₯1
If you want to truly understand how AI systems like #GPT, #Claude, #Llama or #Mistral work at their core, these 85 foundational concepts are essential. The visual below breaks down the most important ideas across the full #AI and #LLM landscape.

https://t.iss.one/CodeProgrammer βœ…
Please open Telegram to view this post
VIEW IN TELEGRAM
❀11πŸ‘2πŸ’―2πŸ”₯1
This media is not supported in your browser
VIEW IN TELEGRAM
The #Python library #PandasAI has been released for simplified data analysis using AI.

You can ask questions about the dataset in plain language directly in the #AI dialogue, compare different datasets, and create graphs. It saves a lot of time, especially in the initial stage of getting acquainted with the data. It supports #CSV, #SQL, and Parquet.

And here's the link 😍

πŸ‘‰ https://t.iss.one/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
❀13πŸ‘2πŸ”₯1
Forwarded from Machine Learning
100+ LLM Interview Questions and Answers (GitHub Repo)

Anyone preparing for #AI/#ML Interviews, it is mandatory to have good knowledge related to #LLM topics.

This# repo includes 100+ LLM interview questions (with answers) spanning over LLM topics like
LLM Inference
LLM Fine-Tuning
LLM Architectures
LLM Pretraining
Prompt Engineering
etc.

πŸ–• Github Repo - https://github.com/KalyanKS-NLP/LLM-Interview-Questions-and-Answers-Hub

https://t.iss.one/DataScienceM βœ…
Please open Telegram to view this post
VIEW IN TELEGRAM
❀7πŸ‘3
πŸ‘©β€πŸ’» FREE 2026 IT Learning Kits Giveaway

πŸ”₯Whether you're preparing for #Cisco #AWS #PMP #Python #Excel #Google #Microsoft #AI or any other in-demand certification – SPOTO has got you covered!

🎁 Explore Our FREE Study Resources
Β·IT Certs E-book : https://bit.ly/3YvSMHL
Β·IT exams skill Test : https://bit.ly/4r4VHnd
Β·Python, ITIL, PMP, Excel, Cyber Security, cloud, SQL Courses : https://bit.ly/4qNWl8r
Β·Free AI online preparation material and support tools : https://bit.ly/4qKiKTN

πŸ”— Need IT Certs Exam Help? contact: wa.link/dm4kyz
πŸ“² Join IT Study Group for insider tips & expert support:
https://chat.whatsapp.com/BEQ9WrfLnpg1SgzGQw69oM
❀5πŸ‘4
⚑️ All cheat sheets for programmers in one place.

There's a lot of useful stuff inside: short, clear tips on languages, technologies, and frameworks.

No registration required and it's free.

https://overapi.com/

#python #php #Database #DataAnalysis #MachineLearning #AI #DeepLearning #LLMS

https://t.iss.one/CodeProgrammer ⚑️
Please open Telegram to view this post
VIEW IN TELEGRAM
❀13πŸ‘1
Do you want to teach AI on real projects?

In this #repository, there are 29 projects with Generative #AI,#MachineLearning, and #Deep +Learning.

With full #code for each one. This is pure gold: https://github.com/KalyanM45/AI-Project-Gallery

πŸ‘‰ https://t.iss.one/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
1❀11πŸ‘3
πŸ’› Top 10 Best Websites to Learn Machine Learning ⭐️
by [@codeprogrammer]

---

🧠 Google’s ML Course
πŸ”— https://developers.google.com/machine-learning/crash-course

πŸ“ˆ Kaggle Courses
πŸ”— https://kaggle.com/learn

πŸ§‘β€πŸŽ“ Coursera – Andrew Ng’s ML Course
πŸ”— https://coursera.org/learn/machine-learning

⚑️ Fast.ai
πŸ”— https://fast.ai

πŸ”§ Scikit-Learn Documentation
πŸ”— https://scikit-learn.org

πŸ“Ή TensorFlow Tutorials
πŸ”— https://tensorflow.org/tutorials

πŸ”₯ PyTorch Tutorials
πŸ”— https://docs.pytorch.org/tutorials/

πŸ›οΈ MIT OpenCourseWare – Machine Learning
πŸ”— https://ocw.mit.edu/courses/6-867-machine-learning-fall-2006/

✍️ Towards Data Science (Blog)
πŸ”— https://towardsdatascience.com

---

πŸ’‘ Which one are you starting with? Drop a comment below! πŸ‘‡
#MachineLearning #LearnML #DataScience #AI

https://t.iss.one/CodeProgrammer 🌟
Please open Telegram to view this post
VIEW IN TELEGRAM
❀10πŸ”₯2
This media is not supported in your browser
VIEW IN TELEGRAM
GitHub has launched its learning platform: all #courses and certificates in one place.

#Git, #GitHub, #MCP, using #AI, #VSCode, and much more.

And most of the content is #free: β†’ https://learn.github.com

πŸ‘‰ @codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
❀8πŸ‘1
🎯 Want to Upskill in IT? Try Our FREE 2026 Learning Kits!

SPOTO gives you free, instant access to high-quality, updated resources that help you study smarter and pass exams faster.
βœ… Latest Exam Materials:
Covering #Python, #Cisco, #PMI, #Fortinet, #AWS, #Azure, #AI, #Excel, #comptia, #ITIL, #cloud & more!
βœ… 100% Free, No Sign-up:
All materials are instantly downloadable

βœ… What’s Inside:
γƒ»πŸ“˜IT Certs E-book: https://bit.ly/3Mlu5ez
γƒ»πŸ“IT Exams Skill Test: https://bit.ly/3NVrgRU
γƒ»πŸŽ“Free IT courses: https://bit.ly/3M9h5su
γƒ»πŸ€–Free PMP Study Guide: https://bit.ly/4te3EIn
γƒ»β˜οΈFree Cloud Study Guide: https://bit.ly/4kgFVDs

πŸ‘‰ Become Part of Our IT Learning Circle! resources and support:
https://chat.whatsapp.com/FlG2rOYVySLEHLKXF3nKGB

πŸ’¬ Want exam help? Chat with an admin now!
wa.link/8fy3x4
❀6
Forwarded from Learn Python Hub
Media is too big
VIEW IN TELEGRAM
9 key concepts of artificial intelligence, explained in 7 minutes

- Tokenization
- #TextDecoding
- #PromptEngineering
- Multi Step #AI Agents
- #RAGs
- #RLHF
- #VAE
- #DiffusionModels
- #LoRA

πŸ‘‰ @Python53
Please open Telegram to view this post
VIEW IN TELEGRAM
❀11πŸŽ‰3
Forwarded from Machine Learning
πŸ“Œ Your First 90 Days as a Data Scientist

πŸ—‚ Category: DATA SCIENCE

πŸ•’ Date: 2026-02-14 | ⏱️ Read time: 8 min read

A practical onboarding checklist for building trust, business fluency, and data intuition

#DataScience #AI #Python
❀3
This media is not supported in your browser
VIEW IN TELEGRAM
πŸ”– An excellent resource for learning about neural networks

We're sharing a cool resource for learning about neural networks, offering clear, step-by-step instruction with dynamic visualizations and easy-to-understand explanations.

In addition, you'll find many other useful materials on machine learning on the site.

Find and use it β€” https://mlu-explain.github.io/neural-networks/

tags: #AI #ML #PYTHON

➑ @CODEPROGRAMMER
Please open Telegram to view this post
VIEW IN TELEGRAM
❀11πŸ‘2πŸ”₯2
🎯 2026 IT Certification Prep Kit – Free!

πŸ”₯Whether you're preparing for #Python, #Cisco, #PMI, #Fortinet, #AWS, #Azure, #AI, #Excel, #comptia, #ITIL, #cloud or any other in-demand certification – SPOTO has got you covered!

βœ… What’s Inside:
・Free Python, Excel, Cyber Security, Cisco, SQL, ITIL, PMP, AWS courses: https://bit.ly/3M9h5su
・IT Certs E-book: https://bit.ly/3Mlu5ez
・IT Exams Skill Test: https://bit.ly/3NVrgRU
・Free Cloud Study Guide: https://bit.ly/4kgFVDs
・Free AI material and support tools:https://bit.ly/46qvpDX

πŸ‘‰ Become Part of Our IT Learning Circle! resources and support:
https://chat.whatsapp.com/FlG2rOYVySLEHLKXF3nKGB

πŸ’¬ Want exam help? Chat with an admin now!
wa.link/8fy3x4
❀8πŸ”₯2
πŸ—‚ One of the best resources for learning Data Science and Machine Learning

Kaggle offers interactive courses that will help you quickly understand the key topics of DS and ML.

The format is simple: short lessons, practical tasks, and a certificate upon completion β€” all for free.

Inside:
β€’ basics of Python for data analysis;
β€’ machine learning and working with models;
β€’ pandas, SQL, visualization;
β€’ advanced techniques and practical cases.


Each course takes just 3–5 hours and immediately provides practical knowledge for work.

➑ Link to the platform

tags: #ML #DEEPLEARNING #AI

➑ https://t.iss.one/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
❀8πŸ’―3
πŸ’Ύ 6 AI courses from Anthropic for free

If you work with AI, agents, or APIs, this is the foundation that developers in top companies are currently going through.

▢️ Working with the Claude API
https://anthropic.skilljar.com/claude-with-the-anthropic-api 


▢️ Introduction to Model Context Protocol (MCP)
https://anthropic.skilljar.com/introduction-to-model-context-protocol 


▢️ Claude in Amazon Bedrock
https://anthropic.skilljar.com/claude-in-amazon-bedrock 


▢️ Claude in Google Cloud (Vertex AI)
https://anthropic.skilljar.com/claude-with-google-vertex 


▢️ Advanced MCP
https://anthropic.skilljar.com/model-context-protocol-advanced-topics 


▢️ Claude Code in Practice
https://anthropic.skilljar.com/claude-code-in-action 


tags: #courses #ai

➑ https://t.iss.one/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
❀9πŸ‘2πŸ’―2