(imagename) (bounding_box_coordinates) (class_name)
Is there any other way to make annotation easier in COWC dataset?
Thanks in advance:)
(imagename) (bounding_box_coordinates) (class_name)
Is there any other way to make annotation easier in COWC dataset?
Thanks in advance:)
Copyright © 2021 Jogjafile Inc.
The COWC dataset comes with annotations where each cars is labeled with a single point. A PNG file contains the annotations. Here's how I find the annotation locations in the PNG file.
The problem here is that both of these values will be indexed as nonzero but we only need one of them. The COWC dataset marks cars with a red dot and negative with a blue dot, we don't need the alpha channel so the new array needs be sliced so that we don't count the alpha channel and get duplicate index values.
You now have an index to all the points in the annotation file.
y_ind
corresponds to the height dimension,x_ind
to the width. This means at the first x, y position we should see an array that looks like this[255, 0, 0]
. This is what I get when I look up the first x, y position from the indexHere the author decides to create a bounding box that is 20 pixels on a side centered on the annotation provided in the dataset. To create a single bounding box for the first annotation in this image you can try this.
You'll have to loop through all the x, y values to make all the bounding boxes for the image. Here's a rough and dirty way to create a csv file for a single image.
I plan on breaking up a huge image into much smaller ones which will change the values of the bounding boxes. I hope you find this helpful and like a good place to start.