alpr-unconstrained
alpr-unconstrained copied to clipboard
The funtion about "augment_sample" in sampler.py
Hi, I am studying your code recently. I find that all training images are processed by this function. Is it mean that the WPOD-Net is trained without original images?
Can I understand that the WPOD-Net is trained with the data which have been augmented, without the original data? Thank you very much!
I think there is a small chance of the augmentation function generates the original images since everything is random... This is a common practice, darknet framework does the same to train YOLO.
@sergiomsilva ,Can you give a detail explain about the "def augment_sample(I,pts,dim)" in sampler.py?
pph = getRectPts(dx,dy,dx+wsiz,dy+hsiz) ## tlx,tly,brx,bry
pts = pts*iwh.reshape((2,1))
T = find_T_matrix(pts2ptsh(pts),pph)
H = perspective_transform((dim,dim),angles=angles)
H = np.matmul(H,T)
Iroi,pts = project(I,H,pts,dim)
I don not understand the above code . Thank you !
Hi @xiaowenhe , this is a good question. In the first 3 lines, the original corner points are transformed into a rectangular bounding box with aspect ratio varying between 2:1 and 4:1. In other words, T matrix rectifies the LP with a random aspect ratio. Then, in the next two lines, a perspective transformation with random rotation (H) is combined with T to generate the final transformation.
@wmn931201 Hello, I would like to ask how to get enhanced data based on the original data?Looking forward to your reply. Thank you.