SforAiDl / Playground

A python library consisting of pipelines for visual analysis of different sports using Computer Vision and Deep Learning.
MIT License
18 stars 17 forks source link

Correct image formatting #13

Closed ashwinvaswani closed 4 years ago

ashwinvaswani commented 4 years ago

Currently, image formatting is slightly off with different parts of code using images loaded by cv2 and some using images loaded by PIL. Since the formats are different, there are some bugs. We will stick to OpenCV for image loading and all image operations from now on so changing PIL stuff wherever possible to OpenCV.

rajanarasimhan commented 4 years ago

Bhaiya I would like to take this issue

rajanarasimhan commented 4 years ago

kindly guide how to proceed

ashwinvaswani commented 4 years ago

Sure. Basically, we're fixing to standard practice of using only OpenCV to load images. However in some places we cannot avoid the usage of PIL because torchvision transforms use PIL format.

In Badminton.py, remove all instances of loading images with PIL ie the code Image.open() with cv2.imread and if this image is passed to detect_image, then while passing, set the PIL_image_flag parameter as False.