Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
holtskinner committed Nov 30, 2024
1 parent 0aee5e6 commit 5613015
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
paligemma
pytorch
VLM
AALR
ADMA
AFX
Expand Down Expand Up @@ -444,6 +441,7 @@ Uszkoreit
Utik
VAPO
VFT
VLM
VMs
VOS
VQA
Expand Down Expand Up @@ -903,6 +901,7 @@ owlbot
oxml
pagemap
paleo
paligemma
pancetta
pantarba
paracord
Expand Down Expand Up @@ -953,6 +952,7 @@ pymupdf
pypdf
pyplot
pysftp
pytorch
pyvis
qna
qrel
Expand Down
5 changes: 3 additions & 2 deletions vision/getting-started/image_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@
"import imghdr\n",
"import io\n",
"import random\n",
"from typing import List\n",
"\n",
"from PIL import Image, ImageDraw\n",
"from google.colab import files\n",
Expand All @@ -294,6 +293,8 @@
"from vertexai.preview.vision_models import Image as Vertex_Image\n",
"\n",
"# Resizes image bytes while preserving the aspect ratio.\n",
"\n",
"\n",
"def get_resized_bytes(image_bytes, max_size):\n",
" image = Image.open(io.BytesIO(image_bytes))\n",
" buffered = io.BytesIO()\n",
Expand Down Expand Up @@ -358,7 +359,7 @@
"\n",
"\n",
"# Converts a segmentation response to labeled bounding boxes.\n",
"def get_labeled_boxes(response: ImageSegmentationResponse) -> List:\n",
"def get_labeled_boxes(response: ImageSegmentationResponse) -> list:\n",
" labeled_boxes = []\n",
" for mask in response.masks:\n",
" bounding_box = get_bounding_box(mask._pil_image)\n",
Expand Down

0 comments on commit 5613015

Please sign in to comment.