Skip to content

Comparison of HoG and Faster R-CNN models on the Penn-Fudan dataset, completed during my study abroad at Hong Kong Baptist University (HKBU).

Notifications You must be signed in to change notification settings

Luka-Babetzki/CV-Model-Comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

CV-Model-Comparison

A simple Python project to compare two popular computer vision models for pedestrian detection: Histogram of Oriented Gradients (HoG) and Faster R-CNN.

Features

  • Loads all images from the Penn Fudan Pedestrian dataset
  • Detects pedestrians using:
    • HoG + SVM (OpenCV)
    • Faster R-CNN (PyTorch/Torchvision)
  • Visualises detection results with bounding boxes

Requirements

  • Python 3.x
  • OpenCV
  • scikit-image
  • PyTorch
  • Torchvision

Usage

  1. Install dependencies:

    pip install opencv-python scikit-image torch torchvision
  2. Download the Penn Fudan Pedestrian dataset and place it in a folder, e.g. c:/path/to/PennFudanPed/PNGImages.

  3. Update the images_folder variable at the top of both HoG Model.py and Faster R-CNN Model.py to the path where your dataset images are stored:

    images_folder = 'c:/path/to/PennFudanPed/PNGImages'  # Update this path as needed
  4. Run the HoG model:

    python "HoG Model.py"
  5. Run the Faster R-CNN model:

    python "Faster R-CNN Model.py"

Each script will process and display the detection results for every image in the dataset folder.

Notes

  • Ensure the dataset path is correct in both scripts.
  • The HoG model uses greyscale images and classical feature-based detection.
  • The Faster R-CNN model uses a deep learning approach and may require a GPU for faster inference.
  • Results may vary depending on the image and environment.

About

Comparison of HoG and Faster R-CNN models on the Penn-Fudan dataset, completed during my study abroad at Hong Kong Baptist University (HKBU).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages