I have a class method to which I have to pass in image path as argument, the method looks like this
self.add_image(
"nucleas",
image_id=image_id,
path=os.path.join(dataset_dir, image_id, "images/{}.jpg".format(image_id)))
but my folder has both, jpg and jpeg images, is there way it can give options like jpg/jpeg.
I was thinking of using try/except for the argument, but I'm not sure if that will work.
Any suggestions would be helpful.
format."{} - {}".format(1, 2)gives1 - 2if that is what you are asking for.