(imgs)
| 141 | |
| 142 | |
| 143 | def 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 | |
| 155 | def is_batched(img): |
no test coverage detected