The NVIDIA® Parking space detection sample app is an example of using convolutional deep neural network, called ParkNet, for visual perception of parking spaces. Specifically, the ParkNet DNN allows detection and precise localization of available parking spaces in image space and conversion of 2D coordinates from the images space to 3D world coordinates of the input camera-rig. The ParkNet app demonstrates perception by overlaying the lines of general-shape quadrilateral that constitute an available parking space on top of the input video stream. It also identifies and displays the entry line to the parking space location. Such an entry line is one of the four lines of the detected quadrilateral. The conversion of the 2-D coordinates of the corners of the quadrilateral into 3-D coordinates of the camera-rig space is implemented implicitly within the app.
Parking
sample app.The ParkNet sample app has several input parameters defining its behavior. The following section explains the sample app input parameters.
The ParkNet sample, sample_parking_perception
, accepts the following optional parameters. If none are specified, it performs detections of parking spaces on a supplied pre-recorded video.
./sample_parking_perception --input-type=[video|camera] --camera-type=[camera] --camera-group=[a|b|c|d] --camera-index=[0|1|2|3] --video=[path/to/video] --stopFrame=[frame number] --ltm=[0|1]
Where:
--input-type=[video|camera] Defines if the input is from a live camera or from a recorded video. Live camera is supported only on NVIDIA DRIVE(tm) platforms. It is not supported on Linux (x86 architecture) host systems. Default value: video --camera-type=[camera] Specifies a supported AR0231 `RCCB` sensor. Only applicable if --input-type=camera. Default value: ar0231-rccb-bae-sf3324 --camera-group=[a|b|c|d] Is the group where the camera is connected to. Only applicable if --input-type=camera. Default value: a --camera-index=[0|1|2|3] Indicates the camera index on the given port. Default value: 0 --video=[path/to/video] Defines the path to the video for the app to process. If this option is not set, the default sample video is used. Default value: data/samples/parking/sample.h264 --model=[DEFAULT] Defines the ParkNet model to use for detection of parking spaces. There is currently only a single model available - DEFAULT. Default value: DEFAULT --stopFrame=[frame number] Defines the end position of the video segment for the app. Only frames up to this frame_number will be processed. The special setting of `0` enables to process all frames from the sequence with unlimited looping. Default value: 0 --ltm=[0|1] Defines the setting of local tone mapping. The value of `1` enables the local tone-mapping, `0` disables it. Default value: 0
./sample_parking_perception
./sample_parking_perception --video=<video file.raw>
./sample_parking_perception --video=<video file.raw> --stopFrame=3000
./sample_parking_perception --input-type=camera --camera-type=<rccb camera type> --camera-group=<camera group> --camera-index=<camera idx on camera group>
where <camera type>
is a supported RCCB
sensor. See Cameras Supported for the list of supported cameras for each platform.
./sample_parking_perception --ltm=1
In the app's output, the green overlay lines represent detected parking spaces. The red line within the parking-lines boundary represents the entry line to the parking space. Such a line corresponds to a line between two of the four corners representing the parking space.
The following image shows a typical output of the ParkNet sample app on the default video sequence.