<p>I have 6600 images and I am supposed to know the rotation of the object in each image. So, given an image, I want to regress to a single value.</p>
<p>My attempt: I use Resnet-18 to extract a feature vector of length 1000 from an image. This is then passed to three fully-connected layers: fc(1000, 512) -&gt; fc(512, 64) -&gt; fc(64, 1)</p>
<p>The problem I am facing right now is that my training loss and validation loss immediately go down after the first 5 epochs and then they barely change. But my training and validation accuracy fluctuates wildly throughout.</p>
<p>I understand that I am experiencing over-fitting and I have done the following to deal with it:</p>
<ul>
<li>data augmentation (Gaussian noise and color jittering)</li>
<li>L1 regularization</li>
<li>dropout</li>
</ul>
<p>So far, nothing seems to be changing the results much. The next thing I haven't tried is reducing the size of my neural net. Will that help? If so, how should I reduce the size?</p>

CC BY-SA 4.0
2020-12-08T04:07:02.807Z
Try going directly from the 1000 feature vector to an output of 1. What's your loss function? It's also not unreasonable to treat this as a classification problem, but a resolution of 1 degree (ie, just have 360 output nodes), but this depends on how diverse your data is. Even so, it's worth a try because a lower resolution but accurate network is better than one that hardly fits at all.
Recessive
CC BY-SA 4.0
2020-12-08T04:07:58.957Z
Also, it's super super important when you augment you aren't flipping the image, as this could really mess with the true rotation
Recessive
<neural-networks><deep-learning><deep-neural-networks><regression><feature-extraction>
How should I use deep learning to find the rotation of an object from its 2D image?
Muhammad Sarim Mehdi
# How should I use deep learning to find the rotation of an object from its 2D image?

(Asked by: username_0 on 2020-12-08)

I have 6600 images and I am supposed to know the rotation of the object in each image. So, given an image, I want to regress to a single value.

My attempt: I use Resnet-18 to extract a feature vector of length 1000 from an image. This is then passed to three fully-connected layers: fc(1000, 512) -> fc(512, 64) -> fc(64, 1)

The problem I am facing right now is that my training loss and validation loss immediately go down after the first 5 epochs and then they barely change. But my training and validation accuracy fluctuates wildly throughout.

I understand that I am experiencing over-fitting and I have done the following to deal with it:

* data augmentation (Gaussian noise and color jittering)
* L1 regularization
* dropout

So far, nothing seems to be changing the results much. The next thing I haven't tried is reducing the size of my neural net. Will that help? If so, how should I reduce the size?

**Tags:** neural-networks, deep-learning, deep-neural-networks, regression, feature-extraction

> **Comments:**
> **username_1**: Try going directly from the 1000 feature vector to an output of 1. What's your loss function? It's also not unreasonable to treat this as a classification problem, but a resolution of 1 degree (ie, just have 360 output nodes), but this depends on how diverse your data is. Even so, it's worth a try because a lower resolution but accurate network is better than one that hardly fits at all.  
> **username_1**: Also, it's super super important when you augment you aren't flipping the image, as this could really mess with the true rotation  

---

## 0 answers

