Answers.Body: <p>It is actually very easy, I didn't know the solution would be that simple.
  With opencv, you can do :</p>
  <pre><code>resized_roi= cv2.resize(roi, (224,224)) 
  </code></pre>
  <p>and that's it :]</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-17T14:16:50.613Z
Answers.LastActivityDate: 2021-06-17T14:16:50.613Z
Answers.UserDisplayName: Valentin
Body: <p>As English is not my native language, I have some hard time understanding the following sentence:</p>
  <blockquote>
  <p>Regardless of the size or aspect ratio of the candidate region, we warp all pixels in a tight bounding box around it to the required size. Prior to warping, we dilate the tight bounding box so that at the warped size there are exactly p pixels of warped image context around the original box (we use p = 16).</p>
  </blockquote>
  <p>This is from <a href="https://arxiv.org/pdf/1311.2524.pdf#page=3" rel="nofollow noreferrer">the R-CNN paper</a>. I already extracted the ROI, but now, they say that the input of the CNN should be 227 x 227, but a lot of my ROIs are much smaller. How can I deal with it?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-21T23:26:55.617Z
Comments.Text: Hello. I am still not sure if your question was theoretical/conceptual or practical (programming issue), but I would like to note that programming issues are generally off-topic here. See https://ai.stackexchange.com/help/on-topic for more details.
Comments.UserDisplayName: nbro
Tags: <deep-learning><papers><object-detection><r-cnn>
Title: What to do when the ROIs are smaller than $227 \times 227$ in R-CNN?
UserDisplayName: Valentin
ThreadText: # What to do when the ROIs are smaller than $227 \times 227$ in R-CNN?
  
  (Asked by: username_0 on 2021-06-17)
  
  As English is not my native language, I have some hard time understanding the following sentence:
  
  > Regardless of the size or aspect ratio of the candidate region, we warp all pixels in a tight bounding box around it to the required size. Prior to warping, we dilate the tight bounding box so that at the warped size there are exactly p pixels of warped image context around the original box (we use p = 16).
  
  This is from [the R-CNN paper](https://arxiv.org/pdf/1311.2524.pdf#page=3). I already extracted the ROI, but now, they say that the input of the CNN should be 227 x 227, but a lot of my ROIs are much smaller. How can I deal with it?
  
  **Tags:** deep-learning, papers, object-detection, r-cnn
  
  > **Comments:**
  > **username_1**: Hello. I am still not sure if your question was theoretical/conceptual or practical (programming issue), but I would like to note that programming issues are generally off-topic here. See https://ai.stackexchange.com/help/on-topic for more details.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-06-17. Score: 2 | Accepted answer
  
  It is actually very easy, I didn't know the solution would be that simple.
  With opencv, you can do :
  
  ```
  resized_roi= cv2.resize(roi, (224,224)) 
  
  ```
  
  and that's it :]
  
  
  ---
  
  