You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
, you multiply height scale to x[0] & x[2] and width scale to x[1] & x[3].
However, in the readme of Wider-Face data set mentioned that
The format of txt ground truth is as follows:
File name
Number of bounding box
x1, y1, w, h, blur, expression, illumination, invalid, occlusion, pos
I mean that, I guess a mistake occur in this part of code. Maybe you should change the dataset.py as follows:
# scale coordinateheight, width=image.shape[:2]
width_scale, height_scale=640.0/width, 640.0/heightcoordinates=np.array(list(map(lambdax: [
x[0] *width_scale, # Change this partx[1] *height_scale, # Change this partx[2] *width_scale, # Change this partx[3] *height_scale# Change this part
], coordinates)))
Am I correct?
Just as another note. I suggest that you add a general ListDataset class instead of specific data sets (e.g., Wider-Face, Pascal VOC, etc.). For example the ListDataset class can use data set annotations as follows:
Load image/labels/boxes from a list file (e.g., *.txt file).
The list file is like:
a.jpg xmin ymin xmax ymax label xmin ymin xmax ymax label ...
Thank you
The text was updated successfully, but these errors were encountered:
Hi @ahkarami ,
The coordinates have been converted to top left bottom right at here.
And a more flexible and general Dataset class is considered. We already supported VOC dataset and now we're training on it. If it works, we will refactor dataset.py to adapt for other dataset too.
louis-she
changed the title
Probable Mistake in dataset.py
dataset adapter
Jul 14, 2018
@louis-she,
Thank you for your response.
Please note that about training on VOC dataset in this state, I think because the aspect_ratio is 1:1 and data augmentation methods don't implement yet, so the obtained result maybe will not be good.
I'll try to help you in near future (I try to find free time for it) via some pull requests, to further strengthen your codes.
Good luck
Dear @louis-she & @pengbo0054,
In
sfd.pytorch/dataset.py
Lines 97 to 100 in 3f62b17
x[0]
&x[2]
and width scale tox[1]
&x[3]
.However, in the
readme
of Wider-Face data set mentioned thatI mean that, I guess a mistake occur in this part of code. Maybe you should change the
dataset.py
as follows:Am I correct?
Just as another note. I suggest that you add a general
ListDataset
class instead of specific data sets (e.g., Wider-Face, Pascal VOC, etc.). For example theListDataset
class can use data set annotations as follows:Thank you
The text was updated successfully, but these errors were encountered: