Question about MATLAB Mask RCNN code from github.
3 ビュー (過去 30 日間)
古いコメントを表示
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!
0 件のコメント
回答 (1 件)
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
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!