Difference between transform, target_transform and transforms in VOC_DETECTION_DATASET

username: Dhorka
cooked: <p>Hi,</p>
<p>I was checking the documentation of the <a href="https://pytorch.org/docs/stable/torchvision/datasets.html#torchvision.datasets.VOCDetection" rel="nofollow noopener">VOC dataset</a> provided by pytorch. I saw that there are three parameters very similar: transform, target_transform and transforms. As far as I understood transforms apply the same transformation to the rgb and the label. However, I didn’t see that “transforms” functionality in the pytorch documentation. How can I generate this transforms function that VOC detection dataset requires?</p>
<p>Thanks</p>

username: ptrblck
cooked: <p>You could either define a custom transformation, which accepts the image and target or use e.g. the <a href="https://github.com/pytorch/vision/blob/master/references/segmentation/transforms.py">segmentation transformations</a>, which also accept these two arguments.</p>

username: Dhorka
cooked: <p>Thanks! The documentation of these methods is not included in the official documentation, right? Because, yesterday I was loooking for this methods in the documenetaiton  and I was not able to find it.</p>

username: ptrblck
cooked: <p>I’m not sure what the current plan for the <code>references</code> is and if these transformations should eventually land in an own module or be used in another way.</p>
<p>CC <a class="mention" href="/u/fmassa">@fmassa</a>, <a class="mention" href="/u/pmeier">@pmeier</a></p>
<p>If these transformations should become available in a submodule, would you be interested in adding the docs <a class="mention" href="/u/dhorka">@Dhorka</a>?</p>

username: pmeier
cooked: <p><a class="mention" href="/u/dhorka">@Dhorka</a></p>
<blockquote>
<p>However, I didn’t see that “transforms” functionality in the pytorch documentation.</p>
</blockquote>
<p>You are right about the lack of documentation about this. Have a look at this <a href="https://github.com/pytorch/vision/issues/2212" rel="noopener nofollow ugc">issue</a>. The author had a similar question.</p>

username: amosella
cooked: <p>I faced some time ago the same problem. If <a class="mention" href="/u/dhorka">@Dhorka</a> is not interested, I’m volunteering to help to document this submodule.</p>

username: ptrblck
cooked: <p>That sounds fantastic. <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"><br>
I would recommend to create a new issue with your suggestion and tag <a class="mention" href="/u/pmeier">@pmeier</a> as well as <a class="mention" href="/u/fmassa">@fmassa</a> to discuss the documentation.</p>

username: amosella
cooked: <p>Just to be sure. Do you want me to create the issue on GitHub?</p>

username: pmeier
cooked: <p>Yes, please create an issue for that linking this thread and tag me. If you can, please also link other issues related to yours. Otherwise I’ll link them. After you have created an issue we can discuss this with <a class="mention" href="/u/fmassa">@fmassa</a> and you can send a PR fixing this.</p>

username: amosella
cooked: <p>Sorry for the delay I had an unforeseen issue the past two weeks. Today, I’m going to create the Github issue.</p>