Python code for vision