How to use a CNN to predict free space in a 2d environment with obstacles? When given a image(300 x 300) with obstacles(Basic 2D shapes) I want to predict 10 coordinates values in the image that will not collide with the obstacles using a CNN.

For now I am giving the coordinates of those 10 points(as train labels) like following
[[x11,x12, ..., y11,y12..], [x21,x22,... , y21,y22...]]
And I trained the nw but predicted label values are not close to the original one.

IS There a different approach I can take to find the coordinates of those 10 points with a CNN?
Instead of predicting free space, you can detect shapes/obstacles with a detector  or a mask builder and after determine free spaces locations.

In my opinion, this is a better approach to predict where are obstacles instead of predict where there are no obstacles (free space).