Question about MATLAB Mask RCNN code from github.

조회 수: 4 (최근 30일)
DaeYoung
DaeYoung 2021년 3월 12일
답변: Prabhan Purwar 2021년 8월 6일
Hello, I am trying to test the code, 'Mask RCNN with MATLAB' on the external website, 'https://github.com/matlab-deep-learning/mask-rcnn'.
I have a question on the function, [rpnTrainingSamples.m] , 41~50 line.
The code is :
=====================================================================================
% Sub-sample negative samples to avoid using too much memory.
numPos = sum(positiveIndex);
negIdx = find(negativeIndex);
numNeg = numel(negIdx);
nidx = params.RandomSelector.randperm(numNeg, min(numNeg, 5000));
% Pack data as int32 to save memory.
regionProposals = int32([regionProposals(positiveIndex, :); regionProposals(nidx, :)]);
anchorIDs = {int32([anchorIDs(positiveIndex) anchorIDs(nidx)])};
anchorIndices = {int32([anchorIndices(positiveIndex,:); anchorIndices(nidx,:)])};
=====================================================================================
The above packed data will be used for training samples of RPN.
However, for the negative samples of regionProposals (and anchorIDs, etc..), those with indices 'nidx' are packed.
As I know of, the variable 'nidx' is just a randomly shuffled numbers in the range of [1, numNeg].
So, I am afraid that 'regionProposals(nidx, :)' may not represent the negative samples but all the samples (positive, negative, ignored).
Is it right?
Thank you!

답변 (1개)

Prabhan Purwar
Prabhan Purwar 2021년 8월 6일
Hi,
Thanks for reporting the issue. As a workaround kindly consider replacing nidx with numNeg(nidx) in the above code. I have bought the issue to the notice of our developer and will try to fix it in future releases.
Thanks

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by