A content-based 3D shape retrieval system that, given a 3D shape, finds the most similar shapes in a given 3D shape database build for the University of Utrecht Multimedia Retrieval course.
Get all the shapes from the Princeton and Labeled PSB Dataset into the project.
Processing the entire Princeton or PSB databases can be very challenging! These contain hundreds of shapes in multiple classes. A good way to proceed with the assignment is to first consider a reduced database. The key constraints here are that:
The reduced database should contain at least 200 shapes;
You should have shapes of most (ideally all) of the 19 class types;
Try to balance the classes, i.e., do not use tens of models of one class and only a handful of models of another class.
Given a query shape, modify the simple query mechanism built in Step 4 to return the K-nearest neighbors or the R-nearest neighbors (where K and R are user-supplied parameters), using ANN.
Display a read-in shape with shading using OpenGL. Drawing Cell-Edges is optional but advised. If you do this make sure that you can turn it on or off by keystrokes.
Read in PLY or OFF shapes from a file into a datastructure. Only 1 structure needs to be read. Check out which one is the easiest to work with, not the easiest to convert.
The current writer works incorrectly on some systems and writes out decimal values with a ',' rather than '.' making our java systems and our own unable to read the files back in. Furthermore multiple exceptions occure within those java environments because of this process. So somewhere something goes wrong, find it and eliminate it.
Discover source of the ','/'.' issue
Rewrite writer to be able to only output points
Discover source of errors for the java processes
Make a fail-safe and fix/prevent it from happening.
A local of local descriptors need to be calculated later on. However it is not easy to compare local descriptors between shape. It make this process easier, a class should be made which contains a histogram of all the local descriptors (of one type) and is able to compare a histogram of the same type between two shapes.
Create generic histogram which can contain values of local descriptors
Normalise histogram values so amount of samples does not matter.
Allow comparison of the same descriptor types in the class
Design a simple normalization tool, the tool should read each shape, translate it so that its barycenter coincides with the coordinate-frame origin, and scale it uniformly so that it tightly fits in a unit-sized cube centered in the origin.
Create an instance of the histogram class which can calculate the follow for each shape:
Distance between the barycenter and a random vertex
Distance between 2 random vertices
Square root of an area of a triangle given by 3 random vertices
Cube root of volume of tetrahedron formed by 4 random vertices
A (large) number of random points should be used for these properties, the exact amount should be figured out through testing, so make sure we can modify a property to determine the random amount. It is best to place this value in the Settings.
Use the variaty of methods which we made to calculate descriptors for all the shapes and store these in a seperate file for quick reloading so we don't need recalculate them all.
Implement all quality metric. Motivate your choice and describe how you implement the respective metric based on how the query system works (you provide a query shape and number K, you get K shapes in return).
All Relevant
All Irrelevant
Total
True Positive
False Positive
All Correct
False Negative
True Negative
All Incorrect
Metrics
Accuracy: (Correct Relevant + False Irrelevant) / Total
Precision: Correct Relevant / All Correct
Recall: Correct Relevant / All Relevant
Specificity: Incorrect Irrelevant / All Irrelevant
Use the histogram class to create an instance which contains the angle between 3 random vertices in the shape.
A (large) number of random points should be used for these properties, the exact amount should be figured out through testing, so make sure we can modify a property to determine the random amount. It is best to place this value in the Settings.
The previous java file does not simplify shapes but only combine points. We need to write either our own program or find one online which reduces the amount of vertices for our shape.
In the FeatureManager which contains all the featurevectors should these 2 methods be added and the data needs to be saved in DescriptionProperties (The ini manager).
Calculate Average for all vectors
Calculate Standard deviation for all vectors
Normalise all featurevectors (in particular the elementary descriptors)
Give decision to calculate new or get them from ini file.
Currently the Controller makes use of a single Options object with all the variables which can be changed, however this should be improved with special modes called: "Verbs". The Console Line Reader package has explanations about Verbs and how we can best implement it.
Requirement: Issue concerning caching needs to be solved.
New UI directory for all the console classes.
Verb for viewing files
Verb for Refining files
Verb for Measuring/Analysing shapes
Verb for Feature Extraction
Verb for Querying
Verb for Evaluation/Analysing results
Ensure multiple verbs can be called at the same time.
Take the feature database (all feature vectors computed for all shapes in the database, already constructed in Step 3) and construct a spatial search structure for it. For this, use the Approximate Nearest Neighbor (ANN) library (see Pointers on Website).
The Princeton Shape Library makes us of specific .cla files to determine the classification. We need to convert this classification to our map structure where each map is a class.
Currently the application sometimes load cache values and othertimes not. It should be improved so that it can be specified if cached data should be loaded or recalculated. Our default usage should be loading previous data.