ποΈ Data Nodes
Data Nodes interact with your file system. Whenever you read or write files, you should use these nodes.
π Read
The Read Node is responsible for reading images from a directory. During processing, it goes through all the files within that directory. Currently, we support images in the formats: .jpg
, .jpeg
and .png
.
βοΈ Write
Use this node whenever you want to save the resulting image to a file. You can define both the target directory as well as the prefix of the saved file.
outputs/
directory with the names result_[ID].png
π¦ Write Bounding Box
This node is useful whenever you generate a dataset for object detection task. This node calculates the bounding boxes for an image. The bounding boxes are calculated under the assumption that the background of the object of interest is transparent. In other words, if you want to save a bounding box for an image, make sure that your object of interest is the only object in an image and that the background is transparent.
JSON
The bounding boxes can be saved in a JSON
format in the following way.
[
{
'x': 10, // Left
'y': 50, // Top
'w': 30, // Width
'h': 20, // Height
'x2': 40, // Right
'y2': 70, // Bottom
},
...
]
YOLO
Currently, Rodina Flow does not have support for multiple classes so an example output of a YOLO-formatted bounding boxess could be the following.
// class x_center y_center width height
0 0.270020 0.266113 0.133789 0.155273