convert rectangle to circle after training process

1 view (last 30 days)
I applied this code to draw a rectangle on the region of interest that i want after taining using faster RCNN .I want to convert the drawn rectangle to be circle in the next step , could you help me please ?
pp=alexnet;
ppl=pp.Layers;
pp=pp.Layers(1:19);
ppp=[pp
fullyConnectedLayer(2)
softmaxLayer()
classificationLayer()]
options = trainingOptions('sgdm',...
'InitialLearnRate',1e-3,...
'MaxEpochs',10,...
'CheckpointPath',tempdir);
train1 = trainFasterRCNNObjectDetector(gTruth,ppp,options, ...
'NegativeOverlapRange',[0 0.1], ...
'PositiveOverlapRange',[0.5 1], ...
'SmallestImageDimension',300);
a = imread('US0018_0131.png');
a = imresize(a,[227 227]);
[bbox,score,label] = detect(train1,a);
detect= insertShape(a,'rectangle',bbox);
figure
imshow(detect)

Answers (0)

Categories

Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!