You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same image in different sets has the same name. However, the image format of 'train' is '.jpg', while the others are '.png'. So you need to turn the '.png' files into '.jpg' files. Otherwise, OpenCV can't find you low light images, and return TypeError. (your code can't open your low light datasets image)
Here's the code to modify the file type,
import os
file_path = r"..\train_dark"
files = os.listdir(file_path)
for file in files:
if file.endswith('png'):
src = os.path.join(file_path, file)
r_name = file.split('.')[0] + '.jpg'
dct = os.path.join(r"..\train_dark", r_name)
os.rename(src, dct)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
The text was updated successfully, but these errors were encountered: