jasjeetIM / Mask-RCNN

Implementation of Mask-RCNN in Caffe https://arxiv.org/pdf/1703.06870.pdf
232 stars 141 forks source link

Get error in proposal layer #12

Closed SingL3 closed 6 years ago

SingL3 commented 6 years ago

Greeting! I am trying to use this code in FPN, replacing ROI Pooling with this ROI Align. However, after I do that, I will encounter this error: `Solving...
keep:2000

keep:2000
I0522 10:25:30.679405 23051 solver.cpp:229] Iteration 0, loss = 1.77196
I0522 10:25:30.679448 23051 solver.cpp:245] Train net output #0: FPNClsLoss = 0.693561 ( 1 = 0.693561 loss)
I0522 10:25:30.679457 23051 solver.cpp:245] Train net output #1: FPNLossBBox = 0.0844015 (
1 = 0.0844015 loss)
I0522 10:25:30.679463 23051 solver.cpp:245] Train net output #2: RcnnLossBBox = 0.0404102 ( 1 = 0.0404102 loss)
I0522 10:25:30.679472 23051 solver.cpp:245] Train net output #3: RcnnLossCls = 0.973891 (
1 = 0.973891 loss)
I0522 10:25:30.679481 23051 sgd_solver.cpp:107] Iteration 0, lr = 0.001
/mnt/disk1/lin/roialign_FPN/tools/../lib/rpn/proposal_w0p6_layer.py:259: RuntimeWarning: invalid value encountered in greater_equal
keep = np.where((ws >= min_size) & (hs >= min_size))[0]
keep:0
Traceback (most recent call last):
File "./tools/train_net.py", line 112, in
max_iters=args.max_iters)
File "/mnt/disk1/lin/roialign_FPN/tools/../lib/fast_rcnn/train.py", line 146, in train_net
model_paths = sw.train_model(max_iters)
File "/mnt/disk1/lin/roialign_FPN/tools/../lib/fast_rcnn/train.py", line 86, in train_model
self.solver.step(1)
File "/mnt/disk1/lin/roialign_FPN/tools/../lib/rpn/proposal_w0p6_layer.py", line 210, in forward
pad = npr.choice(keep, size=post_nms_topN - len(keep))
File "mtrand.pyx", line 1126, in mtrand.RandomState.choice
ValueError: a must be non-empty
` where keep is the number that kept in proposal layer and I am trying to debug it. Last time when I met this error, it is because there are some noisy data in my dataset and I have corrected them. I dont know how to solve this and I just replacing ROI Align back with ROI Pooling, and there are no error any more. Is there any solution?

SingL3 commented 6 years ago

I didn't set the layer parameter right. I am sorry