A practical workshop on object detection using YOLOv8 and computer vision fundamentals.
This repository contains resources and code for a hands-on workshop introducing computer vision and object detection. Participants will learn how to:
✅ Set up their development environment
✅ Train custom YOLOv8 models
✅ Implement real-time object detection using webcams
🔗 Google Colab Notebook - Model Training
📁 Workshop Files Google Drive
📸 Upload Images for Training
- Python 3.11 or later
- Webcam (for real-time detection)
- GitHub account (optional)
- Google account (for Google Colab)
1️⃣ Install Anaconda
chmod +x Anaconda3-2024.10-1-MacOSX-arm64.sh
./Anaconda3-2024.10-1-MacOSX-arm64.sh
conda --version2️⃣ Create & Activate Environment
conda create --name yolov8-env python=3.11 -y
conda activate yolov8-env3️⃣ Install Required Packages
conda update conda
conda install -c pytorch pytorch torchvision
pip install ultralytics
pip install label-studio4️⃣ Start Label Studio
label-studio start📌 Open http://localhost:8080 in your browser.
1️⃣ Install Anaconda
- Download from Anaconda Download Page
- Follow installation instructions
- Verify installation:
conda --version
2️⃣ Create & Activate Environment
conda create --name yolov8-env python=3.11 -y
conda activate yolov8-env3️⃣ Install Required Packages
conda update conda
conda install -c pytorch pytorch torchvision
pip install ultralytics
pip install label-studio4️⃣ Start Label Studio
label-studio start📌 Access at http://localhost:8080.
- Install dependencies (as described above)
- Clone this repository:
git clone https://github.com/YOUR_USERNAME/computer-vision-101.git cd computer-vision-101
- Collect images for custom object detection
- Upload to the Google Drive folder
- Annotate using Label Studio or CVAT
- Use the Google Colab notebook
- Upload your annotated dataset
- Train the YOLOv8 model
- Download the trained model weights
- Download the trained model from Colab
- Run the provided object detection script
- Modify detection parameters as needed
1️⃣ Download your trained model from Google Colab and place it in your project directory.
2️⃣ Modify the model_path variable in the provided script to point to your model file.
3️⃣ Run the detection script:
python object_detection.py4️⃣ Controls:
- Press
qto quit - Press
sto save a screenshot
- Run your terminal as Administrator (Windows) or use
sudo(macOS).
- Ensure your environment is activated:
conda activate yolov8-env
- Regularly update
pipandconda:pip install --upgrade pip conda update conda
- If your webcam isn't detected, change the device index:
cv2.VideoCapture(0) # Try changing 0 to 1 or 2
This project is licensed under the MIT License – see the LICENSE file for details.
🙏 Special thanks to:
- Ultralytics for YOLOv8
- All workshop participants for their contributions
