How to use color img instead of grayscale img
tingfengwanxiao opened this issue · 5 comments
I see the img using grayscale ,how to using color img to get more Color feature
Duplicated with #184
BTW, what kind of features?
It's like using three channels instead of a single grayscale channel
You can use toolbox to grab the origin frames.
from stagesepx import toolbox
with toolbox.video_capture(self.video_path) as cap:
frame = toolbox.get_frame(cap, self.frame_id)
emm,It's the problem.In your code
to make orign img to gray to train and test,like (100,100),but I want to using orign img (100,100,3),so I change the code like this
but it make the problem
ValueError: Input 0 of layer conv2d is incompatible with the layer: expected axis -1 of input shape to have value 1 but received input with shape (None, 200, 200, 3) in keras train and test,so have you try to using orign img to train and test,I think it may get better result
Cool it's a good point. I have not tried it.
stagesepx/stagesepx/classifier/keras.py
Line 105 in 2ff6fac
ValueError was caused by our pre-defined keras model.
As you can see we lock the channel to 1.
You can try to extend KerasClassifier and create your own model for test.
Or just change 1 to 3.