vehicleDetectorACF

Load vehicle detector using aggregate channel features

Description

example

detector = vehicleDetectorACF returns a pretrained vehicle detector using aggregate channel features (ACF). The returned acfObjectDetector object is trained using unoccluded images of the front, rear, left, and right sides of the vehicles.

detector = vehicleDetectorACF(modelName) returns a pretrained vehicle detector based on the model specified in modelName. A 'full-view' model uses training images that are unoccluded views from the front, rear, left, and right sides of vehicles. A 'front-rear-view' model uses images only from the front and rear sides of the vehicle.

Examples

collapse all

Load the pre-trained detector for vehicles

detector = vehicleDetectorACF('front-rear-view');

Load an image and run the detector.

I = imread('highway.png');
[bboxes,scores] = detect(detector,I);

Overlay bounding boxes and scores for vehicles detected in the image.

I = insertObjectAnnotation(I,'rectangle',bboxes,scores);
figure
imshow(I)
title('Detected Vehicles and Detection Scores')

Input Arguments

collapse all

Type of vehicle detector model, specified as either 'front-rear-view' or 'full-view'. A 'full-view' model uses training images that are unoccluded views from the front, rear, left, and right sides of vehicles. A 'front-rear-view' model uses images only from the front and rear sides of the vehicle.

Data Types: char | string

Output Arguments

collapse all

Trained ACF-based object detector, returned as an acfObjectDetector object.

Introduced in R2017a