Darknet: conversion from RGB input to grayscale

Created on 26 Aug 2019  路  6Comments  路  Source: AlexeyAB/darknet

Hi,
Is it possible to change my RGB input to grayscale for training? My dataset is RGB colored images, however, I want to train the network on grayscale images. is it possible to train on grayscale by automatically converting from RGB to grayscale? Or I need to first convert from RGB to grayscale and then create data files from scratch?

All 6 comments

@MuhammadAsadJaved Hi,

Just set channels=1 in your cfg-file.

@AlexeyAB OK. Thank you very much.

@MuhammadAsadJaved
Does grayscale training give you better detections?

@ycelik I am working with IR images.

@AlexeyAB Changing channels=1 in cfg file will automatically convert RGB input to grayscale or still i also need to change the RGB input to grayscale first and then set channels=1 ? Because my current dataset is RGB. I am a bit confused. Thank you for your time and positive response.

@AlexeyAB Changing channels=1 in cfg file will automatically convert RGB input to grayscale or still i also need to change the RGB input to grayscale first and then set channels=1 ? Because my current dataset is RGB. I am a bit confused. Thank you for your time and positive response.

He said you only need to set channels=1 in you cfg files :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mididou picture Mididou  路  3Comments

off99555 picture off99555  路  3Comments

shootingliu picture shootingliu  路  3Comments

yongcong1415 picture yongcong1415  路  3Comments

qianyunw picture qianyunw  路  3Comments