auto select class with ocr python version