I notice that predict.py basically does this, but it seems to start an interactive session. For downstream tools that depend on this, a CLI would be useful. I imagine you would run it something like predict.py image.png and it would return some text string via stdout.