https://github.com/NanoNets/object-detection-sample-python/blob/03e632dd76d148ced9f61503371d4554c133d2ff/code/upload-training.py#L13 Right now even for file with extension .jpeg, it replaces with .jpg and throws error, whereas it should ignore file if not present