MCPcopy Create free account
hub / github.com/ModalityDance/Omni-R1 / valid_images

Function valid_images

src/transformers/src/transformers/image_utils.py:143–152  ·  view source on GitHub ↗
(imgs)

Source from the content-addressed store, hash-verified

141
142
143def valid_images(imgs):
144 # If we have an list of images, make sure every image is valid
145 if isinstance(imgs, (list, tuple)):
146 for img in imgs:
147 if not valid_images(img):
148 return False
149 # If not a list of tuple, we have been given a single image or batched tensor of images
150 elif not is_valid_image(imgs):
151 return False
152 return True
153
154
155def is_batched(img):

Callers 15

preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
_preprocess_stepMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85
preprocessMethod · 0.85

Calls 1

is_valid_imageFunction · 0.85

Tested by

no test coverage detected