onnx / onnx/models

Possible typo in imagenet_preprocess.py

Open
#433 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Jupyter Notebook
Stars
9.8k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Bug Report

Which model does this pertain to?

vgg16

Describe the bug

https://github.com/onnx/models/blob/master/vision/classification/imagenet_preprocess.py#L13 uses Resize(224).
However, preprocess_test_data used in https://github.com/onnx/models/blob/master/vision/classification/vgg/train_vgg.ipynb has Resize(256).
Resize(256) operation is correct and gives better accuracy than Resize(224).

Is Resize(256) before the center crop is specific to only vgg16 and not for all other models that use imagenet dataset?

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

Start with vision/classification/imagenet_preprocess.py and the preprocess_test_data cell in vision/classification/vgg/train_vgg.ipynb; compare the resize-before-center-crop steps for VGG16 and other ImageNet models. Determine whether Resize(256) is specific to VGG16 or should be reflected in the shared preprocessing script, then verify the confirmed preprocessing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.