Skip to content

Instantly share code, notes, and snippets.

View shukkkur's full-sized avatar
🦊
Brrrrr

Shakhansho Shukur Sabzaliev shukkkur

🦊
Brrrrr
View GitHub Profile
#!/usr/bin/env python3
import os
import sys
import numpy as np
import cv2 as cv
np.set_printoptions(suppress=True)
# https://stackoverflow.com/questions/68541509/evaluate-the-correctness-of-in-extrinsic-params-resulting-from-camera-calibratio
@Kaveh8
Kaveh8 / check_invalid_images.py
Last active August 31, 2023 00:27
python snippet for checking invalid image files in a directory
import os
import imghdr
path = "./dataset/PetImages/dog/"
dir_ = os.listdir(path)
for image in dir_:
file = os.path.join(path,image)
if not imghdr.what(file):
print(file)
#if you want to remove them, uncomment next line