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

5 vues (au cours des 30 derniers jours)
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);

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 22 Mai 2019
Modifié(e) : KALYAN ACHARJYA le 22 Mai 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

Plus de réponses (1)

ping.jiang
ping.jiang le 13 Juin 2019
捕获.PNG 将最后一个卷积层改为3.

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by