toolbox
toolbox copied to clipboard
ValueError: cannot reshape array of size 9 into shape (4,2)
@ming71 I am using your this toolbox to augment my DOTA type custom dataset. The environment is all set on windows 10 server with anaconda environment.
After running the code I am getting the following error. As DOTA has 10 values in annotation file "x1 y1 x2 y2 x3 y3 x4 y4 class category"
The error is in the function below, as we have 10 values 0-9 in the array I also did change the reshape(5, 2) but again error. def bbox_area(bbox): bbox = np.asarray(bbox) bbox = np.array(bbox).reshape(4, 2) poly = Polygon(bbox).convex_hull return poly.area
Can you please guide me through what is going wrong here? @Captain1986