Skip to content

Training Guide

Arbaaz edited this page Sep 8, 2025 · 2 revisions

Training Guide

1. Test YOLOv8 by Inference from Ultralytics

Note

Get the detection.py from ultralytics github page and for yolov8 only

python detection.py --model yolov8n.onnx --source data/images/horses.jpg
python detection.py --model yolov8n.onnx --source data/videos/road.mp4
python detection.py --model yolov8n.onnx --source 0

2. Prepare and Get Labelled Dataset

Note

Here I have used Roboflow, but you can use any.

  • Upload images to Roboflow and label them as either fall or nofall.
  • Discard any images that are not relevant by marking them as null.
  • Download the structured dataset from Roboflow and select YOLOv8 for model type when prompted.
  • Extract the zip file from roboflow

3. Train the Model

  • Modify the name for the current operation.
  • Adjust the parameters value to properly utilize the GPU.
yolo detect train model=yolov8n.pt data="path/to/dataset" imgsz=224 device=0 workers=2 batch=16 epochs=100 patience=50 name=yolov8_fallsafe_detection

4. Continue Training after ''Pause'' OR ''Train model with NEW/UPDATED Dataset''

yolo detect train model=runs/classify/yolov8_fallsafe_detection/weights/last.pt resume=True

Clone this wiki locally