This is an implementation of a custom model for classifying navigable terrain for a small robot. The model consists of an SVM paired with an HMM for smoothing.
- Clone the repo
- Navigate to HonorsThesis\SVMFullFeatureSet\C_implementation
- Run make all
- Create a directory under C_implementation called ppm_images
- Populate that directory with training images in PPM format
- Create a second directory under C_implementation called ground_truth
- Populate that directory with binary images in PBM format. Ensure that each binary image has the same name as its associated PPM file (except extension of course). Pixels with value 1 are considered navigable.
- Run ./train_svm from the C_implementation directory.
- Create a directory under C_implementation called test_data
- Populate that directory with your test images in PPM format.
- Create a second directory under C_implementation called test_truth
- Populate that directory with binary images in PBM format. Ensure that each binary image has the same name as its associated PPM file (except extension). Pixels with value 1 are considered navigable.
- Create a third directory called validation_data
- Populate that directory with some validation images in PPM format.
- Create a fourth directory called validation_truth
- Populate that directory with binary images in PBM format. Ensure that each binary image has the same name as its associated PPM file in the validation_data directory (except extension). Pixels with value 1 are considered navigable.
- Run ./classify_dataset, it will print some statistics on the performance of the classifier.
- Run ./classify_image (input ppm) (ground truth pbm) (output ppm name) (tile size) (sigma), tile size is the size of the tiles that features are computed from in the image, sigma can be any value.
- A C++ compiler for your OS.
- Some labeled data. A nice MATLAB labeler is located under HonorsThesis\SVMFullFeatureSet\labeling, which worked pretty well for generating my data, but it might have to be tweaked for your use case.