Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix preprocess_model_config for CIFAR dataset #1659

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

hanrui1sensetime
Copy link
Collaborator

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

The dev-1.x branch failed when deploying mmcls models using CIFAR dataset, because the test_pipeline of CIFAR dataset can not be handled in this branch.

Modification

Fix preprocess_model_config for CIFAR dataset.

BC-breaking (Optional)

None.

Use cases (Optional)

python3 ./tools/deploy.py \
/root/workspace/external_data/code/mmdeploy/configs/mmcls/classification_tensorrt_dynamic-32x32-32x32.py \
/root/workspace/external_data/code/mmclassification/configs/resnet/resnet18_8xb16_cifar10.py \
"/root/workspace/external_data/code/mmdeploy_checkpoints/mmcls/resnetcifar/resnet18_b16x8_cifar10_20210528-bd6371c8.pth" \
"../mmclassification/demo/demo.JPEG"  \
--work-dir "../mmdeploy_regression_working_dir/mmcls/resnetcifar/tensorrt/dynamic/fp32/resnet18_b16x8_cifar10_20210528-bd6371c8"  \
--device cuda  \
--log-level INFO \
--dump-info \
--test-img ../mmclassification/tests/data/color.jpg

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@hanrui1sensetime hanrui1sensetime requested review from grimoire, tpoisonooo and RunningLeon and removed request for grimoire January 16, 2023 08:40
Copy link
Collaborator

@tpoisonooo tpoisonooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard code is too hard to maintain.

How about open an mmcls PR and update preprocess in cfg.test_pipline ?

@hanrui1sensetime
Copy link
Collaborator Author

hard code is too hard to maintain.

How about open an mmcls PR and update preprocess in cfg.test_pipline ?

Now I have removed hardcode Resize for CIFAR10. I have tested that it is unnecessary.

Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RunningLeon RunningLeon merged commit cbddf5a into open-mmlab:dev-1.x Jan 18, 2023
lvhan028 pushed a commit that referenced this pull request Mar 1, 2023
* fix cifar10 for mmcls

* remove unnecessary code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants