SoccerNetv2-DevKit icon indicating copy to clipboard operation
SoccerNetv2-DevKit copied to clipboard

Question about the input image channels of Features/ExtractResNET_TF2.py

Open peachanG opened this issue 2 years ago • 1 comments

When I read preprocess_input in tf.keras, it seems that the input image channel is expected to be "RGB", but the image loaded by OpenCV is supposed to be "BGR", right? In that case, FrameCV.frames would still be BGR, which would be different from the input image expected by tf.keras.preprocess_input and tf.keras.applications, right?

Please let me know if I am wrong as I am not a frequent user of tensorflow.

peachanG avatar May 12 '22 02:05 peachanG

You are absolutely right about OpenCV extracting frames in the order BGR, and as a results, FrameCV.frames would be BGR. Now, each library has a different way of pre-processing the images to extract features, and by experience, they mostly get similar performances in the end task of action spotting, with the best results obtained as explained in this repo. I fact, note that the central channel is green, and since most of the frames are grass, well the BGR and RGB looks very similar! :)

SilvioGiancola avatar May 18 '22 11:05 SilvioGiancola