Automate visual recognition model training