alpr-unconstrained icon indicating copy to clipboard operation
alpr-unconstrained copied to clipboard

The funtion about "augment_sample" in sampler.py

Open wmn931201 opened this issue 6 years ago • 5 comments

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?

wmn931201 avatar Nov 23 '18 07:11 wmn931201

Can I understand that the WPOD-Net is trained with the data which have been augmented, without the original data? Thank you very much!

wmn931201 avatar Nov 23 '18 07:11 wmn931201

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 avatar Nov 29 '18 13:11 sergiomsilva

@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 !

xiaowenhe avatar Dec 27 '18 09:12 xiaowenhe

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.

sergiomsilva avatar Dec 27 '18 12:12 sergiomsilva

@wmn931201 Hello, I would like to ask how to get enhanced data based on the original data?Looking forward to your reply. Thank you.

li675599061 avatar May 30 '19 03:05 li675599061