uci-cbcl / NoduleNet

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

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

Open nengwp opened 3 years ago

nengwp commented 3 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 1 year 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