uci-cbcl / NoduleNet

[MICCAI' 19] NoduleNet: Decoupled False Positive Reduction for Pulmonary Nodule Detection and Segmentation
Other
188 stars 58 forks source link

AttributeError: 'NoduleNet' object has no attribute 'rcnn_logits' #31

Open nengwp opened 4 years ago

nengwp commented 4 years ago

An error occurred when I ran the python test.py eval command. The error seems to be caused by the network module. Can you try to explain it?

dayan2020 commented 3 years ago

AttributeError: 'NoduleNet' object has no attribute 'rcnn_logits' I have the same problem, did you solve that?

dayan2020 commented 3 years ago

@nengwp

nengwp commented 3 years ago

I'm glad you could tell me that you encountered a similar bug and I fixed the problem. The problem is caused by too few test results (0). Please make sure your input is wrong.

QianLingjun commented 2 years ago

the reason is rpn_proposals is none, you should do tab in eval model, example:

if self.use_rcnn:
    if len(self.rpn_proposals) > 0:
        rcnn_crops = self.rcnn_crop(feat_4, inputs, self.rpn_proposals)
        self.rcnn_logits, self.rcnn_deltas = data_parallel(self.rcnn_head, rcnn_crops)
        self.detections, self.keeps = rcnn_nms(self.cfg, self.mode, inputs, self.rpn_proposals, 
                                                                self.rcnn_logits, self.rcnn_deltas)
# add a table
        if self.mode in ['eval']:
            # Ensemble
            fpr_res = get_probability(self.cfg, self.mode, inputs, self.rpn_proposals,  self.rcnn_logits, self.rcnn_deltas)
            self.ensemble_proposals[:, 1] = (self.ensemble_proposals[:, 1] + fpr_res[:, 0]) / 2