# Synthetic dataset of Superquadric Scenes

This is the dataset used in the paper "Segmentation and Recovery of Superquadric Models using Convolutional Neural Networks".

The dataset contains 120000 scenes, of which 80000 are in the test set while the train and validation sets contain 20000 scenes each. Each scene can have from 1 to 5 eually rotated superquadrics viewed in an axonometric projection.

Each scene is described by:

- `sqX.png`: the range image of the scene.
- `sqX_seg.png`: the ground truth mask of the scene, where each superquadric in the scene is painted over with a different gray-value.
- `sqX/`: the directory containing range images of isolated superquadrics without occlusions.
    * `sqX/Y.png`: range image of the Y-th isolated superquadric. The Y values are ordered as the gray values of their masks.

We also provide a `<subset>/<subset>.dat` files, which are dataset descriptor files and store the parameter information of the superquadrics in the scenes.

A dataset descriptor file is structured using N sections (2 - 6 lines long), where each section consists of the first line describing the belonging scene name and the number of superquadrics in the scene (M). The next M lines describe each superquadrics parameters, 17 parameters long. The parameters are ordered as following:

1. x size, range [25-76]  
2. y size, range [25-76]  
3. z size, range [25-76]  
4. First epsilon shape parameter, range [0.01-1]  
5. Second epsilon shape parameter, range [0.01-1]  
6. x position, range [88-169]  
7. y position, range [88-169]  
8. z position, range [100-150]  
9. -17.: 9 rotational matrix parameters aligned as  
    [[9, 10, 11],  
    [12, 13, 14],  
    [15, 16, 17]]  
	Note that this dataset is constructed from equally rotated superquadrics, so all have the same rotational parameters.

Also note that the <subset>.dat is the file that has been initially generated or sampled. The range images are constructed from it. Because of this there are some cases where a superquadric is in the set of parameters in <subset>.dat but is completely obstructed by the rest of the objects in the range image of its scene.
	
An `overlap.dat` file is also added to each `<subset>` directory. In it the Y-th lines first parameter describes if the scene `sqY` contains vertical overlaps between the superquadrics. After this we also write the gray values for the segmentation mask `sqY_seg.png`.

If you choose to use this dataset in your research we invite you to cite this paper:

    @inproceedings{Sircelj2020CVWW,
      author       = "{\v{S}}ircelj, Jaka
	  and Oblak, Tim
	  and Grm, Klemen
	  and Petkovi{\'{c}}, Uro{\v{s}}
	  and Jakli{\v{c}}, Ale{\v{s}}
	  and Peer, Peter
	  and {\v{S}}truc, Vitomir
	  and Solina, Franc",
      title        = {{Segmentation and Recovery of Superquadric Models using Convolutional Neural Network}},
      year         = {2020},
      booktitle    = {{Proc. Computer Vision Winter Workshop (CVWW)}}
    }

---
LMI, UNI-LJ, 5. 2. 2020
