How to increase network input size for 'Tiny-yolov3-coco'?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Fahmi Akmal Dzulkifli
il 29 Ott 2022
Commentato: Khushboo
il 31 Ott 2022
Greetings,
I want to use 'tiny-yolov3-coco' for detecting the cells. As shown in the Figure, I used a network input size of 416x416. However, the total loss is still high. Therefore I want to increase the network input size to 832x832. The code that I used as follows:
networkInputSize = [832 832 3];
baseNetwork = 'tiny-yolov3-coco';
detector = yolov3ObjectDetector(baseNetwork);
net = detector.Network;
lgraph = layerGraph(net);
imgLayer = imageInputLayer(networkInputSize,"Name","input","Normalization","none");
lgraph = replaceLayer(lgraph,"input",imgLayer);
newbaseNetwork = assembleNetwork(lgraph);
However, I got the error as follows:
Error in trainyolov3 (line 61)
newbaseNetwork = assembleNetwork(lgraph);
Caused by:
Network: Missing output layer. The network must have at least one output layer.
Layer 'conv2d_10': Unconnected output. Each layer output must be connected to the input of another layer.
Layer 'conv2d_13': Unconnected output. Each layer output must be connected to the input of another layer.
0 Commenti
Risposta accettata
Khushboo
il 31 Ott 2022
Hello,
The network that you are using is a dlnetwork (which does not have output layers) and not a DAG network. The assembleNetwork function returns a DAG network ready for prediction. If using a dlnetwork works for your usecase, you can do the following:
networkInputSize = [832 832 3];
baseNetwork = 'tiny-yolov3-coco';
detector = yolov3ObjectDetector(baseNetwork);
net = detector.Network;
lgraph = layerGraph(net);
imgLayer = imageInputLayer(networkInputSize,"Name","input","Normalization","none");
lgraph = replaceLayer(lgraph,"input",imgLayer);
newbaseNetwork = dlnetwork(lgraph);
Hope this answers your question!
2 Commenti
Khushboo
il 31 Ott 2022
Hello,
I am not able to understand what this code does. But from what I assume, the error is related to the number of dimensions defined for the last convolution layer. As you are changing the input size, I think the rest of the dimensions will have to be changes correspondingly. Kindly make sure you have done that.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!