fix some bugs and add resize_img_ratio6.py