Open cqray1990 opened 2 years ago
In the code, there are two type of validate_measure function, QuadMeasurer and ICDARDetectionMeasurer.
# DB/structure/measurers/quad_measurer.py
class QuadMeasurer(Configurable):
...
def validate_measure(self, batch, output, is_output_polygon=False, box_thresh=0.6):
return self.measure(batch, output, is_output_polygon, box_thresh)
# DB/structure/measurers/icdar_detection_measurer.py
class ICDARDetectionMeasurer(Configurable):
...
def validate_measure(self, batch, output):
return self.measure(batch, output), [int(self.visualized)]
\ The return values of the two functions are different, but condition state is not defined. And most of the configuration files use QuadMeasurer, but validate function is written based on ICDARDetectionMeasurer.
# DB/experiments/seg_detector/totaltext_resnet50_deform_thre.yaml
...
measurer:
class: QuadMeasurer
\ It seems difficult to proceed with the validation step without modifying the code because there are many other issues.
I chose CDARDetectionMeasurer will meet the same question
raw_metric, interested = self.structure.measurer.validate_measure( batch, output)
i just delete the para interseted and then it works
B/trainer.py", line 153, in validate metrics, vis_images = self.validate_step(loader, model, False) DB/trainer.py", line 174, in validate_step batch, output) ValueError: not enough values to unpack (expected 2, got 1)
maybe bug ?