<p>I'm building a CNN/3DCNN model that classifies hand gestures. The problem is that the actual gesture occupies only like 1% of the whole image. That means that an enormous amount of convolutional operations is done on the "empty" parts of the image, which is useless. </p>

<p>Is there a way to solve this problem? I was thinking about a MaxPooling layer with a giant pool size, but near features that are extracted from the gesture will be probably "compressed" in only 1 feature.</p>

CC BY-SA 4.0
2020-03-10T21:46:15.307Z
I think you can enforce such behavior by modifying the loss function. However, is cropping images out of question in your case? Removing empty parts seem like a simpler approach to me.
SpiderRico
CC BY-SA 4.0
2020-03-10T21:55:42.513Z
Maybe you could use object detection to locate the hand first. Which technique you use really depends on the background. What is the background by the way?
Alexander Soare
CC BY-SA 4.0
2020-03-10T22:02:03.157Z
By the way, "adding focus" is essentially what Faster R-CNN does by incorporating an RPN into the model.
Alexander Soare
CC BY-SA 4.0
2020-03-11T10:12:55.567Z
I was also thinking about object detection first, but that would resize the hand to another resolution, causing images to have different sizes
EDIT: Nevermind, actually, after the hand gets detected, you can just resize the image to the resolution you want. The only problem is that I need datasets both for gestures and hand classification, wich can be a little tricky
Orly
<deep-learning><convolutional-neural-networks>
Is there a way to add "focus" on parts of the image when using CNNs?
Orly
# Is there a way to add "focus" on parts of the image when using CNNs?

(Asked by: username_0 on 2020-03-09)

I'm building a CNN/3DCNN model that classifies hand gestures. The problem is that the actual gesture occupies only like 1% of the whole image. That means that an enormous amount of convolutional operations is done on the "empty" parts of the image, which is useless.

Is there a way to solve this problem? I was thinking about a MaxPooling layer with a giant pool size, but near features that are extracted from the gesture will be probably "compressed" in only 1 feature.

**Tags:** deep-learning, convolutional-neural-networks

> **Comments:**
> **username_1**: I think you can enforce such behavior by modifying the loss function. However, is cropping images out of question in your case? Removing empty parts seem like a simpler approach to me.  
> **username_2**: Maybe you could use object detection to locate the hand first. Which technique you use really depends on the background. What is the background by the way?  
> **username_2**: By the way, "adding focus" is essentially what Faster R-CNN does by incorporating an RPN into the model.  
> **username_0**: I was also thinking about object detection first, but that would resize the hand to another resolution, causing images to have different sizes EDIT: Nevermind, actually, after the hand gets detected, you can just resize the image to the resolution you want. The only problem is that I need datasets both for gestures and hand classification, wich can be a little tricky  

---

## 0 answers

