Utility Code

We provide free source code for a variety of tasks. Check the README.txt within each directory for more details about compiling and running each application.

Parsing .cla files

  • ClaStats provides a simple program for parsing .cla classification files, verifying that the format is valid, and printing summary statistics about the classification.
  • PSBClaParse.h and PSBClaParse.c provide interfaces for parsing .cla files and returning a data structure that holds a list of categories, and a list of model identifiers within each category. The parser also serves as a verifier that the .cla file is properly formatted.

Creating overview web pages

  • ClaOvervew compiles to an application that parses a .cla file and creates overvew web pages for the classification. The web pages show the categories organized in alphabetical order, as well as ordered by size of the class, and a page for each category with thumbnail images linked to the Princeton Shape Benchmark website.
  • info.cgi and cgi-lib.pl must be placed in each web directory where the overview is created. These utilities allow the user to click on a model and see several other images of the same model.
  • PSBClaParse.h and PSBClaParse.c provide interfaces for parsing .cla files and returning a data structure that holds a list of categories, and a list of model identifiers within each category. The parser also serves as a verifier that the .cla file is properly formatted.

Viewing .off files

  • offviewer provides a graphical Windows application for viewing .off files. Run the program as offviewer model.off

Parsing .off files

  • offstats provides an application for parsing .off files and printing simple statistics about a model. Run the program as offstats model.off

Creating precision/recall plots

  • psbPlot provides a program for generating precision-recall plots from a classification and a distance matrix. Plots can be created for each model, each class, or an overall average (the default). Run the program as psbPlot.exe classification.cla method.matrix [-macro|-class|-model]

Calculating retrieval statistics

  • psbTable provides a program for calculating retrieval statistics (nearest neighbor, first tier, second tier, E-Measure, and discounted cumulative gain) for a given classification and distance matrix. Run the program as psbTable.exe classification.cla method.matrix [-macro|-class|-model]

Printing a distance matrix

  • printmatrix provides a program for reading a distance matrix and printing it to the screen. This is a simple program that serves as an example of procesing a distance matrix. Run the program as printmatrix.exe classification.cla method.matrix

Viewing retrieval results

  • bestMatch is a program for generating .html files that display the order of retrieval results when each model is the query in turn. Run the program as bestMatch classification.cla method.matrix outDir

Distance and tier images

  • SimMat produces an image displaying the distance matrix. A color tier image is produced with the first two tiers of retrieval matches colored. The distance matrix can be directly viewed with the -distance flag, where more similar results are indicated with black pixels and more dissimilar results are indicated with white pixels. Run the program as SimMat.bat classification.cla method.matrix outImage.gif

Download

Copyright © 2003 Princeton University