Open guddulrk opened 6 years ago
I have the same issue. I have annotated the offset values in clockwise direction, as @guddulrk mentioned. Any help please
Same here I have the same issue.
Just as a rephrase of the problem .. what is the annotation tool did the guys, who are able to train successfully use?
I try to turn poly question into rectangles annotations.Just like this:
x=[]
y=[]
for point in i['points']:
x.append(point['x'])
y.append(point['y'])
ll.extend([min(x),min(y)])
ll.extend([max(x),min(y)])
ll.extend([max(x),max(y)])
ll.extend([min(x),max(y)])
I try to turn poly question into rectangles annotations.Just like this:
x=[] y=[] for point in i['points']: x.append(point['x']) y.append(point['y']) ll.extend([min(x),min(y)]) ll.extend([max(x),min(y)]) ll.extend([max(x),max(y)]) ll.extend([min(x),max(y)])
But, this is not not solution
I'm pretty sure the program, as written, will only work w/ rectangular bounding boxes.
Some helpful debug procedures:
In icdar.py
, after line 109 add a line to print the coordinate values of the rectangle that is throwing the error, e.g.:
if p_area > 0:
print('poly in wrong direction')
poly = poly[(0, 3, 2, 1), :]
print("poly error: " + str(poly))
Also in icdar.py
, after line 610, add a line to print which ground truth text file the module found the error, e.g.:
text_polys, text_tags = load_annoataion(txt_fn)
print("Working on GT txt: " + str(txt_fn))
text_polys, text_tags = check_and_validate_polys(text_polys, text_tags, (h, w))
This should allow you to pinpoint which selection of coordinates is incorrect and in which file it shows up.
icdar.py data check change if polys.shape[0] == 0: return polys
if polys.shape[0] == 0: return np.array(validated_polys), np.array(validated_tags)
poly in wrong direction poly error:[[326.3 14.98] [347.62 13.82] [347.62 27.65] [327.46 27.65]] poly in wrong direction poly error:[[302.11 12.67] [325.73 12.67] [325.73 25.92] [302.11 25.92]] poly in wrong direction poly error:[[ 65.38 2.3 ] [253.15 2.3 ] [253.15 36.29] [ 65.38 36.29]]
hello @jerryrelmore I print the poly error. I found that the text box in this dataset (ICPR MTWI 2018) is a polygon, not a rectangle. The errors are all polygons. How can I solve this?please help me,thank you!
poly in wrong direction poly error:[[326.3 14.98] [347.62 13.82] [347.62 27.65] [327.46 27.65]] poly in wrong direction poly error:[[302.11 12.67] [325.73 12.67] [325.73 25.92] [302.11 25.92]] poly in wrong direction poly error:[[ 65.38 2.3 ] [253.15 2.3 ] [253.15 36.29] [ 65.38 36.29]]
你好@jerryrelmore 我打印多边形错误。我发现此数据集(ICPR MTWI 2018)中的文本框是多边形,而不是矩形。错误是所有多边形。我该如何解决?谢谢您!
请问你的问题解决了么
I am working on the multi-language dataset. When I train on MLT dataset provided at ICDAR, the training starts correctly, but when I change the dataset and train the dataset on my own dataset, it shows me the error as poly in the wrong direction. I have prepared dataset in the same format as ICDAR, MLT dataset. x1,y1,x2,y2,x3,y3,x4,y4 where x1, y1 are top left coordinates, x2,y2 are top right coordinates, x3, y3 are bottom right coordinates and x4,y4 are bottom left coordinates. A sample of the annotations is given below:
795,347,1241,347,1241,491,795,491,RELIA 1116,508,1230,508,1230,558,1116,558,PAI 399,633,663,633,663,680,399,680,Reliance 466,682,633,682,633,717,466,717,Paints 791,689,1253,689,1253,846,791,846,بچت
Any help, please.