Some changes that make the script work for me using ocropus