Camera Object Detection Saver¶
This script is used to create annotated dataset from camera sensor stream.
Add Camera Object Detection Saver script to an empty game object.
To add a new object, create a new Class Name and assign it a name. Then in “Object in Class” you can add different object that you want to annotate. In the image n, two classes are added, one being Markers and other being Boats. Markers class has one “Buoy” objects that has been included in the scene and Boats class has “Sailboat” included in the scene. The camera used for data acquisition must be set in Camera Views it is possible to get data from more than one camera. Make sure that every object added to the scene has a mesh collider. If some of the objects added to the Objects in Class do not have Mesh colliders the warning will be displayed as show in top part of the image.
Save Frequency Hz - frequency of annotation in Hz.
Minimum Object Area - allows you to remove small objects from the annotation. It is the minimum area of bounding box that will be logged (in pixels).
Vertex Step - step used when iterating over object vertices. A bigger step means less precision but better performance.
Dataset folder - full path to the folder where data will be saved.
Image Width - width of the annotated image. This parameter should be set exactly as the display resolution in Game Mode.
Image Height - height of the annotated image. This parameter should be set exactly as the display resolution in Game Mode.
If Image Width and Image Height parameters are not set as the resolution in the Game Mode the labels will be wrong. There will be no warning and you have to make sure it is set correctly.
Dataset can be separated into train, validation and test subsets. Relations between these three subsets can be set using Train Size, Val Size and Test Size sliders. If you want to have just train and validation subset that can be accomplished by unchecking Generate test subset.
Make sure to check the Enable option to start creating data.
Annotation results are saved in the path set in Database Folder parameter.
The data is organized in the following format:
/dataset_folder/
├── run1/
│ ├── simulation.yaml
│ ├── labels/
│ │ ├── train/
│ │ │ ├ namespace_000000.txt
│ │ │ ├ namespace_000001.txt
│ │ │ .
│ │ │ .
│ │ ├── test/
│ │ └── val/
│ └── images/
│ ├── train/
│ │ ├ namespace_000000.jpg
│ │ ├ namespace_000001.jpg
│ │ .
│ │ .
│ ├── test/
│ └── val/
├── run2/
├── run3/
.
.
.
└── run21/