-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About the training loop #28
Comments
Hi! Maybe I do not get the point of your question. Lines 152 to 228 in 2b93c23
Then each image is cropped (to extract a specific person) and rescaled with an affine warping in: Lines 290 to 296 in 2b93c23
Does this answer to your question? |
Hi,
Thanks for your reply. I think I have get your point. Everytime we get one train data we need to read its corresponding image using `cv2.imread`, but actually one image may contains more than two persons so that is it a little costing time reading same image serveral times?
|
Yes, but images are too much to be stored in RAM (in ordinary machines) so you have to load them from disk and, since the samples are shuffled during training, you have to re-load the same image at different steps of each epoch. |
@stefanopini Bother again. I find when creating dataset, you used |
Hi @murdockhou ! The difference is that using Btw, I've adapted this code from the original implementation and some details are still unclear to me. |
Hi,
Thanks for your reply and sorry for the late reply of mine.
I get your idea and it is very clear for me. The paramete *pixel_std*, I
also looking for its meaning, and looks like it just is a scale factor in
code. If we change the number *pixel_std* in [here](
https://github.com/stefanopini/simple-HRNet/blob/master/datasets/COCO.py#L109),
nothing changed after doing this just for creating dataset. But maybe has
influence on calculating AP/AR durning training. Hopes that I understand
right.
Stefano <notifications@github.com> 于2020年4月2日周四 下午6:41写道:
… Hi @murdockhou <https://github.com/murdockhou> !
The difference is that using warpAffine you can apply affine
transformations instead of just cropping the person area.
This is not useful during evaluation/testing, but it is used during
training for data augmentation.
If you look at the previous lines of the file (L258-L296)
<https://github.com/stefanopini/simple-HRNet/blob/master/datasets/COCO.py#L258-L296>,
you can see that the parameters passed to the function
get_affine_transform simply crop the image if self.is_train is False
while their values are modified to change the scale and to rotate and flip
the person area for data augmentation if self.is_train is True.
I hope it is clearer now.
Btw, I've adapted this code from the original implementation and some
details are still unclear to me.
In particular, I don't know the meaning of the parameter pixel_std (see line
109
<https://github.com/stefanopini/simple-HRNet/blob/master/datasets/COCO.py#L109>
).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMCC7MSVFRN72IKJ5AZUSLRKRTUPANCNFSM4JDOIGNA>
.
|
Thank you both of you for clarifying my understanding. |
Hi @valentin-fngr , that's correct. |
Hi, bother again!
I'm a little confused about training data code here. I find that you return the ori_img with corresponding keypoints annotations together (maybe there are multi persons' annotation). So, as hrnet is run as a single pose network, how can you training network using the ori image instead of the
crop image
based the human box annotation? Is there somewhere you have done this before?For more, clearly, i think we can train hrnet ( a single pose network) using MSCOCO dataset is that we need to crop out multi/single input image from original image because maybe one image could have multi human annotations, just like in
live-demo.py
you have done.So, could you tell me what mine thought is right or not, and to be honest, i'm also confused about how to train a single person pose network with using MSCOCO dataset?
Thanks a lot.
The text was updated successfully, but these errors were encountered: