jdhao / jdhao/jdhao.github.io

2017/11/06/resize-image-to-square-with-padding/

Open
#54 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
27
Forks
5
PR merge metrics
No merged PRs in 30d

Description

How to Resize, Pad Image to Square Shape and Keep Its Aspect Ratio in Python - jdhao's digital space

When we are using convolutional neural networks, most of the time, we need to fix the input image size to feed it to the network. The usual practice is to resize the input image to the given size (the image aspect ratio is no longer kept) and then crop a fixed size patch randomly from the resized image. This practice may work well for image classification where fine details may not be necessary. But for Image retrieval, we want to keep the image aspect ration unchanged. In this post, I will summarize ways to resize an image to square shape with padding and keep its aspect ratio.

https://jdhao.github.io/2017/11/06/resize-image-to-square-with-padding/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue only supplies a post title, article text, and link; first inspect the repository's Hugo content layout and compare existing posts with this material. Done would require a maintainer-confirmed change scope and a matching published page, but neither the target file nor acceptance criteria is specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
hugo, python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.