Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.26 KB

README.md

File metadata and controls

69 lines (48 loc) · 2.26 KB

Traffic Light Detection

Traffic light detection for autonomous driving

For detailed explanations visit medium.com/@kenan.r.alkiek and docs/

Dependencies

  • cv2
  • numpy
  • sklearn
  • skimage
  • matplotlib
  • yaml

Sample Usage

Train A Model

  1. Customize settings in config.yaml (see config options for more information)
  2. Run train.py

Run A Model

  1. Customize settings in config.yaml (see config options for more information)
  2. Run run.py

Config Options

Train Options

  • descriptor - str: hog, lbp, or haar
  • classifier - str: svm (more options to be added)
  • outfile - str: File location to save the trained model to
  • positive_image_directory - str: Where the positive images are stored
  • negative_image_directory - str: Where the negative images are stored
  • window_size - tuple (int, int): Size of the training windows

Run Options

  • descriptor - str: hog, lbp, or haar
  • classifier_location - str: Location of the saved classifier (the output of running train.py)
  • detector - str: spotlight, color
  • heatmap_memory - int: Number of frames to retain before removing the first frame from memory
  • heatmap_threshold - int: Number of overlapping detections in the heatmap before accepting a detection
  • window_size - tuple (int, int): Size of the boxes to classify and draw on
  • image_directory - str: Image directory to run the classifier on

Descriptor Options

HOG

  • block_size - tuple (int, int): Number of cells in each block
  • cell_size - tuple (int, int): Size (in pixels) of a cell
  • orientations - int: Number of orientation bins

LBP

  • points - int: Number of circularly symmetric neighbour set points
  • radius - float: Radius of circle (spatial resolution of the operator)

Haar

  • selected_feature_file - str: File containing the coordinates and types of the Haar features you want to use. More information in the docs

Detector Options

Spotlight

  • max_size - int: How large a spotlight can grow before being rejected
  • kernel - int: Size of the kernel to apply during top-hat morphology
  • threshold - int: Threshold value applied after top-hat morphology