Data Science Jupyter Notebooks
11K subscribers
269 photos
31 videos
9 files
726 links
Explore the world of Data Science through Jupyter Notebooksβ€”insights, tutorials, and tools to boost your data journey. Code, analyze, and visualize smarter with every post.
Download Telegram
πŸ”₯ Trending Repository: pocketbase

πŸ“ Description: Open Source realtime backend in 1 file

πŸ”— Repository URL: https://github.com/pocketbase/pocketbase

🌐 Website: https://pocketbase.io

πŸ“– Readme: https://github.com/pocketbase/pocketbase#readme

πŸ“Š Statistics:
🌟 Stars: 50.3K stars
πŸ‘€ Watchers: 272
🍴 Forks: 2.6K forks

πŸ’» Programming Languages: Go - Svelte - SCSS - CSS - JavaScript - HTML

🏷️ Related Topics:
#golang #authentication #backend #realtime


==================================
🧠 By: https://t.iss.one/DataScienceM
πŸ”₯ Trending Repository: supabase

πŸ“ Description: The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

πŸ”— Repository URL: https://github.com/supabase/supabase

🌐 Website: https://supabase.com

πŸ“– Readme: https://github.com/supabase/supabase#readme

πŸ“Š Statistics:
🌟 Stars: 88.3K stars
πŸ‘€ Watchers: 597
🍴 Forks: 9.8K forks

πŸ’» Programming Languages: TypeScript - MDX - JavaScript - CSS - SCSS - PLpgSQL

🏷️ Related Topics:
#alternative #postgres #firebase #oauth2 #database #ai #example #nextjs #websockets #realtime #postgresql #auth #postgis #embeddings #postgrest #vectors #deno #supabase #pgvector


==================================
🧠 By: https://t.iss.one/DataScienceM
πŸ”₯ Trending Repository: docs

πŸ“ Description: A collaborative note taking, wiki and documentation platform that scales. Built with Django and React.

πŸ”— Repository URL: https://github.com/suitenumerique/docs

🌐 Website: https://docs.numerique.gouv.fr

πŸ“– Readme: https://github.com/suitenumerique/docs#readme

πŸ“Š Statistics:
🌟 Stars: 14.1K stars
πŸ‘€ Watchers: 56
🍴 Forks: 423 forks

πŸ’» Programming Languages: Python - TypeScript - CSS - JavaScript - Makefile - Shell

🏷️ Related Topics:
#government #documentation #django #opensource #mit #knowledge #wiki #reactjs #self_hosted #mit_license #collaborative #knowledge_base #yjs #realtime_collaboration #g2g #blocknotejs


==================================
🧠 By: https://t.iss.one/DataScienceM
❀1
πŸ”₯ Trending Repository: Deep-Live-Cam

πŸ“ Description: real time face swap and one-click video deepfake with only a single image

πŸ”— Repository URL: https://github.com/hacksider/Deep-Live-Cam

🌐 Website: https://deeplivecam.net/

πŸ“– Readme: https://github.com/hacksider/Deep-Live-Cam#readme

πŸ“Š Statistics:
🌟 Stars: 74.6K stars
πŸ‘€ Watchers: 454
🍴 Forks: 10.9K forks

πŸ’» Programming Languages: Python

🏷️ Related Topics:
#ai #realtime #artificial_intelligence #faceswap #gan #webcam #webcamera #deepfake #deep_fake #ai_face #video_deepfake #realtime_deepfake #deepfake_webcam #realtime_face_changer #fake_webcam #ai_webcam #ai_deep_fake #real_time_deepfake


==================================
🧠 By: https://t.iss.one/DataScienceM
#YOLOv8 #ComputerVision #HomeSecurity #ObjectTracking #AI #Python

Lesson: Tracking Suspicious Individuals Near a Home at Night with YOLOv8

This tutorial demonstrates how to build an advanced security system using YOLOv8's object tracking capabilities. The system will detect people in a night-time video feed, track their movements, and trigger an alert if a person loiters for too long within a predefined "alert zone" (e.g., a driveway or porch).

---

#Step 1: Project Setup and Dependencies

We will use ultralytics for YOLOv8 and its built-in tracker, opencv-python for video processing, and numpy for defining our security zone.

pip install ultralytics opencv-python numpy

Create a Python script (e.g., security_tracker.py) and import the necessary libraries. We'll also use defaultdict to easily manage timers for each tracked person.

import cv2
import numpy as np
from ultralytics import YOLO
from collections import defaultdict
import time

# Hashtags: #Setup #Python #OpenCV #YOLOv8


---

#Step 2: Model Loading and Zone Configuration

We will load a standard YOLOv8 model capable of detecting 'person'. The key is to define a polygon representing the area we want to monitor. We will also set a time threshold to define "loitering". You will need a video file of your target area, for example, night_security_footage.mp4.

# Load the YOLOv8 model
model = YOLO('yolov8n.pt')

# Path to your night-time video file
VIDEO_PATH = 'night_security_footage.mp4'

# Define the polygon for the alert zone.
# IMPORTANT: You MUST adjust these [x, y] coordinates to fit your video's perspective.
# This example defines a rectangular area for a driveway.
ALERT_ZONE_POLYGON = np.array([
[100, 500], [800, 500], [850, 250], [50, 250]
], np.int32)

# Time in seconds a person can be in the zone before an alert is triggered
LOITERING_THRESHOLD_SECONDS = 5.0

# Dictionaries to store tracking data
# Stores the time when a tracked object first enters the zone
loitering_timers = {}
# Stores the IDs of individuals who have triggered an alert
alert_triggered_ids = set()

# Hashtags: #Configuration #AIModel #SecurityZone


---

#Step 3: Main Loop for Tracking and Zone Monitoring

This is the core of the system. We will read the video frame by frame and use YOLOv8's track() function. This function not only detects objects but also assigns a unique ID to each one, allowing us to follow them across frames.

cap = cv2.VideoCapture(VIDEO_PATH)

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

# Run YOLOv8 tracking on the frame, persisting tracks between frames
results = model.track(frame, persist=True)

# Get the bounding boxes and track IDs
boxes = results[0].boxes.xywh.cpu()
track_ids = results[0].boxes.id.int().cpu().tolist()

# Visualize the results on the frame
annotated_frame = results[0].plot()

# Draw the alert zone polygon on the frame
cv2.polylines(annotated_frame, [ALERT_ZONE_POLYGON], isClosed=True, color=(0, 255, 255), thickness=2)

# Hashtags: #RealTime #ObjectTracking #VideoProcessing

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

---

#Step 4: Implementing Loitering Logic and Alerts

Inside the main loop, we'll iterate through each tracked person. We check if their position is inside our alert zone. If it is, we start or update a timer. If the timer exceeds our threshold, we trigger an alert for that person's ID.
πŸ”₯ Trending Repository: frigate

πŸ“ Description: NVR with realtime local object detection for IP cameras

πŸ”— Repository URL: https://github.com/blakeblackshear/frigate

🌐 Website: https://frigate.video

πŸ“– Readme: https://github.com/blakeblackshear/frigate#readme

πŸ“Š Statistics:
🌟 Stars: 26.8K stars
πŸ‘€ Watchers: 218
🍴 Forks: 2.5K forks

πŸ’» Programming Languages: TypeScript - Python - CSS - Shell - Dockerfile - JavaScript

🏷️ Related Topics:
#home_automation #mqtt #ai #camera #rtsp #tensorflow #nvr #realtime #home_assistant #homeautomation #object_detection #google_coral


==================================
🧠 By: https://t.iss.one/DataScienceM