Arrangements for image or video recognition or understanding using pattern recognition or machine learning