Borrar filtros
Borrar filtros

'Number of channels in input image must be 3' error when trying to train in YOLO v2

10 visualizaciones (últimos 30 días)
I am trying to apply YOLO v2 in my dataset to train images (greyscale x-ray images). After first epoch it is giving the following error.
Bounding boxes must be fully contained within their associated image and must have positive width and height.
Training on single CPU.
|========================================================================================|
| Epoch | Iteration | Time Elapsed | Mini-batch | Mini-batch | Base Learning |
| | | (hh:mm:ss) | RMSE | Loss | Rate |
|========================================================================================|
| 1 | 1 | 00:04:49 | 42.32 | 1791.2 | 0.0010 |
Error using vision.internal.cnn.yolo.yolov2Datastore>iYOLOv2ChannelAugmentation (line 238)
Number of channels in input image must be 3.
Error in vision.internal.cnn.yolo.yolov2Datastore/readByIndex (line 123)
img = iYOLOv2ChannelAugmentation(img,ds.DatastoreOutSize(1,3));
Error in vision.internal.cnn.yolo.yolov2Datastore/read (line 156)
[data,info] = readByIndex(ds,indices);
Error in nnet.internal.cnn.MultiInputMultiOutputMiniBatchDatastoreDispatcher/next (line 179)
this.Datastore.read());
Error in nnet.internal.cnn.Trainer/train (line 108)
[X, response] = data.next();
Error in vision.internal.cnn.trainNetwork (line 48)
trainedNet = trainer.train(trainedNet, trainingDispatcher);
Error in trainYOLOv2ObjectDetector>iTrainYOLOv2 (line 363)
ds, lgraph, opts, executionSettings, mapping, checkpointSaver, ...
Error in trainYOLOv2ObjectDetector (line 145)
[net, info] = iTrainYOLOv2(ds, lgraph, trainingData, params, mapping, options, checkpointSaver);
Error in trainYOLO (line 65)
[detector,info] = trainYOLOv2ObjectDetector(teethDataset,lgraph,options);

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 22 de Mayo de 2019
Editada: KALYAN ACHARJYA el 22 de Mayo de 2019
I am gussing from thr error-
'Number of channels in input image must be 3' &
"I am trying to apply YOLO v2 in my dataset to train images (greyscale x-ray images)."
The model may accept RGB images/colors, which have 3 channels

Más respuestas (1)

ping.jiang
ping.jiang el 13 de Jun. de 2019
捕获.PNG 将最后一个卷积层改为3.

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by