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

Update feature extractor references #312

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

amyeroberts
Copy link
Contributor

What does this PR do?

Fixes # (issue)

Who can review?

Feel free to tag members/contributors who may be interested in your PR.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

"\n",
"if \"shortest_edge\" in image_processor.size:\n",
" crop_size = image_processor.size[\"shortest_edge\"]\n",
" resize_size = (crop_size, crop_size)\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
" resize_size = (crop_size, crop_size)\n",
" resize_to = (crop_size, crop_size)\n",

@@ -3075,7 +3089,7 @@
"source": [
"pipe = pipeline(\"image-classification\", \n",
" model=model,\n",
" feature_extractor=feature_extractor)"
" feature_extractor=image_processoror)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
" feature_extractor=image_processoror)"
" feature_extractor=image_processor)"

Comment on lines +724 to +744
"ViTImageProcessor {\n",
" \"do_normalize\": true,\n",
" \"do_resize\": true,\n",
" \"image_processor_type\": \"ViTImageProcessor\",\n",
" \"image_mean\": [\n",
" 0.485,\n",
" 0.456,\n",
" 0.406\n",
" ],\n",
" \"image_std\": [\n",
" 0.229,\n",
" 0.224,\n",
" 0.225\n",
" ],\n",
" \"resample\": 3,\n",
" \"rescale_factor\": 0.00392156862745098,\n",
" \"size\": {\n",
" \"height\": 224,\n",
" \"width\": 224,\n",
" },\n",
"}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
"ViTImageProcessor {\n",
" \"do_normalize\": true,\n",
" \"do_resize\": true,\n",
" \"image_processor_type\": \"ViTImageProcessor\",\n",
" \"image_mean\": [\n",
" 0.485,\n",
" 0.456,\n",
" 0.406\n",
" ],\n",
" \"image_std\": [\n",
" 0.229,\n",
" 0.224,\n",
" 0.225\n",
" ],\n",
" \"resample\": 3,\n",
" \"rescale_factor\": 0.00392156862745098,\n",
" \"size\": {\n",
" \"height\": 224,\n",
" \"width\": 224,\n",
" },\n",
"}"
"ViTImageProcessor {\n",
" \"do_normalize\": true,\n",
" \"do_resize\": true,\n",
" \"image_processor_type\": \"ViTImageProcessor\",\n",
" \"image_mean\": [\n",
" 0.485,\n",
" 0.456,\n",
" 0.406\n",
" ],\n",
" \"image_std\": [\n",
" 0.229,\n",
" 0.224,\n",
" 0.225\n",
" ],\n",
" \"resample\": 3,\n",
" \"rescale_factor\": 0.00392156862745098,\n",
" \"size\": {\n",
" \"height\": 224,\n",
" \"width\": 224,\n",
" },\n",
"}"

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.

1 participant