Viewing a single comment thread. View all comments

arararagi_vamp t1_j557ewd wrote

I have built a simple CNN which is able to detect circles on a white background with noise using PyTorch.

Now I wish to extend my network to be able to return the center of the circle as coordinates. The problem is in each data there is a variable number of circles, meaning I would need a variable number of labels for each data. In a CNN however the number of labels remains constant.

How do I work around this problem?

1

stanteal t1_j5f0jaw wrote

As you have said you would need a variable amount of outputs which is not feasible in a CNN. However, you could divide the image into a grid and make predictions of the probability of the center of a circle is within each grid and their x and y offsets . Not sure if there are better resources available, but it might be worth looking at how YOLO or YOLO2 implemented their outputs.

1