Update train_and_detect.py