This repository contains inference code for using a modified stacked-hourglass to detect semantic keypoints on cars.
The network outputs a likelihood of keypoint presence over every pixel of an input image (the input image is a 64 x 64 car bounding box).
This code assumes you have the following packages installed.
- Torch7
- Torch packages:
nn
,cunn
,cudnn
,image
,nngraph
Download the pre-trained model here.
To perform inference on a set of images, first edit valid.txt
and add paths to the images you need to run inference on. These images must only contain cropped car bounding boxes (i.e., from any image that contains a car, pick only one car bounding box and crop the region of the image contained within that bounding box). These are the only kind of images the model has been trained on.
Then, run the inference script.
inference.lua
This will write a results.txt
file (you can edit the name and path of this output file in inference.lua
).