thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

Gray scale trainig #362

Open andresredspace opened 7 years ago

andresredspace commented 7 years ago

I was able to train multiple custom objects using 3 channel images but in not able to set single channel image ("gray scale"). Any idea how can i load gray scale images?

jubjamie commented 7 years ago

Bit of a work around but you could recreate your image data as 3 channels, each with the identical grayscale value. (i.e. a pixel of [221] becomes [221,221,221] ) But of a faff but the 3 channel restriction comes from the network architecture iirc. You might be able to adjust the network itself and try that if you wish.

ziedbouf commented 7 years ago

Same happen for me, when applying change to the network configuration file and setting the channel to 1, it gives an error related to value error as we are trying to reshape the tensor and 3 channels are needed to get the training work. Please any suggestion on this?

jatinmandav commented 6 years ago

Hope #640 this helps your issue!