LandingLens | LandingLens on Snowflake |
---|---|
(see exceptions below) |
- vehicle_123.png
- vehicle_123.xml
If you’re using , uploading Pascal VOC files is not supported whenloading imagesfrom Snowflake stages. You can still upload the files from a hard drive.
Pascal VOC XML Files
When you upload an image and its corresponding XML file to an Object Detection project in LandingLens, the XML file must follow the format of the following code sample:Pascal VOC Elements
The following table explains the elements in the Pascal VOC XML file.Element | Definition | Example |
---|---|---|
<?xml version='1.0' encoding='UTF-8'?> | The XML preamble that defines the XML standard and encoding method. | <?xml version='1.0' encoding='UTF-8'?> |
<annotation> | This element wraps around all objects. | <annotation> |
<object> | This element wraps around all elements that define the labeled object. | <object> |
<pose> | Identifies if the image is skewed. The default value is Unspecified , which means that the image is not skewed. | <pose>Unspecified</pose> |
<occluded> | Indicates if the labeled object overlaps another labeled object. Values:
| <occluded>0</occluded> |
<difficult> | Indicates if the object is easy to detect. Values:
| <difficult>0</difficult> |
<truncated> | Indicates if a bounding box doesn’t include the full object. This could happen because the object isn’t fully in the frame (ex: the object is a cat but it’s only halfway in the picture) or because there is something in front of the object. Values:
| <truncated>0</truncated> |
<name> | The name of the class (label). When the image and the corresponding XML file are uploaded to LandingLens, LandingLens converts this name into a class. | <name>Diamond</name> |
<bndbox> | This element wraps around the dimensions for the edges of the bounding box, which is the rectangle around the labeled object. | <bndbox> |
<xmax> | The distance from the left edge of the image to the right side of the bounding box (in pixels). | <xmax>1032</xmax> |
<xmin> | The distance from the left edge of the image to the left side of the bounding box (in pixels). | <xmin>2085</xmin> |
<ymax> | The distance from the top of the image to the bottom side of the bounding box (in pixels). | <ymax>2800</ymax> |
<ymin> | The distance from the top of the image to the top side of the bounding box (in pixels). | <ymin>2396</ymin> |
<filename> | The file name and image file extension of the image. | <filename>IMG_6397.jpg</filename> |
<segmented> | Indicates if any of the bounding boxes are not rectangles (for example if one is a hexagon). Values:
| <segmented>0</segmented> |
<size> | This element wraps around the dimensions of the image. | <size> |
<height> | The height of the image (in pixels). | <height>4032</height> |
<width> | The width of the image (in pixels). | <width>3024</width> |
Convert to Pascal VOC
If you have images annotated in a format that is NOT Pascal VOC, you can use the Python scripts in this section to convert from YOLO or COCO to Pascal VOC. To convert from other formats, use a third-party conversion tool to convert the files to Pascal VOC. Then upload the images and the XML files to LandingLens.Convert from YOLO to Pascal VOC
Use the following Python script to convert images from YOLO to Pascal VOC:Convert from COCO to Pascal VOC
Use the following Python script to convert images from COCO to Pascal VOC:Upload Images and Their XML Files
If you’re using , uploading Pascal VOC files is not supported when loading images from Snowflake stages. You can still upload the files from a hard drive.
- Open the Object Detection project you want to upload images to.
- Open the Upload pop-up window:
- If you haven’t uploaded any images to the project yet, scroll down to the bottom of the page and click Click Here.
- If you’ve already uploaded images, click the Upload icon.
- If you haven’t uploaded any images to the project yet, scroll down to the bottom of the page and click Click Here.
- Drag and drop the images and Pascal VOC XML files into the project. You can also select the files from a directory. The image and XML file must have the same file name (with different extensions).
- A preview of your images displays. If an image has a correctly-formatted XML file, LandingLens captions it as Pascal Voc.
- To confirm your upload, click the Upload button.
- The pre-labeled images display in your project.