<p>I am working on classifying images in &quot;Left&quot;, &quot;Right&quot;, &quot;Center&quot;, &quot;Back&quot;. Training and Validation images look like this:</p>
<p><a href="https://i.sstatic.net/IXGub.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IXGub.jpg" alt="enter image description here" /></a>
<a href="https://i.sstatic.net/FcFso.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FcFso.jpg" alt="enter image description here" /></a>
<a href="https://i.sstatic.net/ATmCx.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ATmCx.jpg" alt="enter image description here" /></a></p>
<p>The images are &quot;Left&quot;, &quot;Right&quot;, and &quot;Center&quot;. I am following Pytorch transfer learning tutorial with Resnet50 architecture and have not changed anything.</p>
<p>The transformations I am using is as follows.</p>
<pre><code>data_transforms = {&quot;train&quot;  : A.Compose([
                           A.Resize(256,256),
                          #  A.ShiftScaleRotate(shift_limit=0.05, scale_limit=0.05, rotate_limit=15, p=0.5),
                          #  A.RandomCrop(height=128, width=128),
                           A.RGBShift(r_shift_limit=15, g_shift_limit=15, b_shift_limit=15, p=0.5),
                           A.RandomBrightnessContrast(p=0.5),
                           A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
                           ToTensorV2(),]),
                  &quot;val&quot;: A.Compose([
                                    A.Resize(256,256),
                                    # A.CenterCrop(height=128, width=128),
                                    A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
                                    ToTensorV2(),])
                }
</code></pre>
<p>Initially I had back images too, but they were getting miss-classified with center a lot with val accuracy 65%.</p>
<p>Without back images I got 74% accuracy with labels left, right and center.
Modified it to classify only center and not center, with only three type of images &quot;left&quot;, &quot;right&quot; and &quot;center&quot; I have achieved 91% of val accuracy.</p>
<p>I am looking for ways to increase accuracy for classifying images in left, right, center.</p>

CC BY-SA 4.0
2021-09-13T23:43:00.373Z
Hi sandepp! does your dataset contain only one object?
malioboro
CC BY-SA 4.0
2021-09-14T11:18:30.793Z
No, there are various products which I gathered from different sources mostly include electrical products like these. One of the sites I scrapped was Eaton
sandepp
<deep-learning><image-recognition><pytorch>
How to increase accuracy of image orientation classification (Left, Right, Center)?
sandepp
# How to increase accuracy of image orientation classification (Left, Right, Center)?

(Asked by: username_0 on 2021-09-13)

I am working on classifying images in "Left", "Right", "Center", "Back". Training and Validation images look like this:



The images are "Left", "Right", and "Center". I am following Pytorch transfer learning tutorial with Resnet50 architecture and have not changed anything.
The transformations I am using is as follows.
data_transforms = {"train"  : A.Compose([
                           A.Resize(256,256),
                          #  A.ShiftScaleRotate(shift_limit=0.05, scale_limit=0.05, rotate_limit=15, p=0.5),
                          #  A.RandomCrop(height=128, width=128),
                           A.RGBShift(r_shift_limit=15, g_shift_limit=15, b_shift_limit=15, p=0.5),
                           A.RandomBrightnessContrast(p=0.5),
                           A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
                           ToTensorV2(),]),
                  "val": A.Compose([
                                    A.Resize(256,256),
                                    # A.CenterCrop(height=128, width=128),
                                    A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
                                    ToTensorV2(),])
                }

Initially I had back images too, but they were getting miss-classified with center a lot with val accuracy 65%.
Without back images I got 74% accuracy with labels left, right and center.
Modified it to classify only center and not center, with only three type of images "left", "right" and "center" I have achieved 91% of val accuracy.
I am looking for ways to increase accuracy for classifying images in left, right, center.

**Tags:** deep-learning, image-recognition, pytorch

> **Comments:**
> **username_1**: Hi username_0! does your dataset contain only one object?  
> **username_0**: No, there are various products which I gathered from different sources mostly include electrical products like these. One of the sites I scrapped was Eaton  

---

## 0 answers

