Data Science Asked on January 6, 2022
I am trying to design and train a neural network, which would be able to give me coordinates of certain key points in the image.
I’ve got a dataset containing 1800 images similar to these:
This dataset is generated by me. Each image contains two circles, one smaller and one bigger, generated randomly in the image. My goal is to train the neural network to return 2 sets of coordinates, each of them pointing precisely at the center of the circle. Each image has the shape (320, 320, 1).
I’ve been successful to do so to some degree, but it’s not good enough. Below, you can see the neural net architecture I’ve been most successful so far. I use Python, Tensorflow 2 including Keras. I use Adam optimizer, MeanSquaredError loss and RootMeanSquaredError as a metric.
The current result looks as follows. The coordinates that the neural net gave me are drawn in the image.
As you can see from the first image, the result is quite precise that I am almost satisfied with. But the average result looks like as in the second image, which is not good at all.
I have trained this model for 35 epochs in a total of 4 runs and it is not able to learn any further as you can see from the Tensorboard.
I have tried many different variations of the architecture and tuned hyperparameters. I am not satisfied with the result I got so far. I plan to continue on detecting keypoints from images on more complex datasets and that is the reason why I’m trying to make some progress on much simpler datasets first and add complexity gradually.
I would appreciate any advice you can give me on the model architecture that I would have better results with or maybe a different approach. Tell me if you need to know more implementation details.
Edit: To complete the details, Conv2D layers use leaky relu activation function and both dense layers use the sigmoid activation function.
My guess is that you wouldn't need machine learning to do that. Adesh Gautam suggested to create bounding box then apply an ML model. I will sugest more thant that : just use a bounding box algorithm. There are a lot of computer vision techniques that can be applied before resorting to ML. I would suggest you to also look at hedge detection.
Answered by lcrmorin on January 6, 2022
You could train YOLO to detect and create bounding box around the circle and then calculate its center. Or even segmentation could help you do this precisely.
Answered by Adesh Gautam on January 6, 2022
2 Asked on April 17, 2021 by patrik-zaoral
1 Asked on April 17, 2021 by rohan-singh-dhaka
2 Asked on April 16, 2021 by shonix3373
1 Asked on April 16, 2021 by sp_
0 Asked on April 16, 2021
1 Asked on April 16, 2021
2 Asked on April 16, 2021
3 Asked on April 16, 2021
2 Asked on April 16, 2021
1 Asked on April 16, 2021 by user91090
1 Asked on April 15, 2021 by anbal-snchez-numa
0 Asked on April 15, 2021 by vamper1234
1 Asked on April 15, 2021 by alex-dore
1 Asked on April 15, 2021
2 Asked on April 15, 2021 by gypaetebarbu
0 Asked on April 15, 2021 by statsnoob
0 Asked on April 15, 2021 by rylan-schaeffer
Get help from others!