Description
Found a small bug: On traversing through same image in multiple epochs and hence doing random_scaling every time, the coordinates in the previous epch get mutliplied by the scale factor every time, thus the dimensions of the character boxes overshoots the image dimension and hence no bounding boxes or region or affinity boxes made for that epoch.
Reason : The list indexing and slicing done in load_image_gt_and_confidencemask function in Synth80k class doesn't make a deep copy of the charbox coordinates and hence the same coordinates get modified.
Solution : using deepcopy for making list copy at line
_charbox = copy.deepcopy(self.charbox[index]).transpose((2, 1, 0))
CRAFT-Reimplementation/data/dataset.py
Line 39 in fbaa63a
Although I found it working on master branch:
CRAFT-Reimplementation/data_loader.py
Line 406 in d24fd68
As a result in say 10th epoch, all we have is this image as output with no character boxes:
After fixing with deepcopy, then it produces this after 10 epochs and random scaling :
@backtime92 . Pardon me for tagging here but if this is not fixed already(excuse me if that is already fixed), this can certainly increase accuracy since if this is not done, then in the later epochs, all that the network is seeing is a plain image with no input character regions.