Preprocessing for images #18
sebffischer
started this conversation in
Ideas
Replies: 1 comment
-
Would be cool if something like that worked 🤔 There's at least one transformation that has to be applied every time: Directly after that transformation we'll have to deal with device placement, i.e. moving the image tensor to a GPU (which involves detecting if one is available, or choosing one if multiple are available). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an idea how to implement the preprocessing for images.
I general I think we want something like
In the train method of the alexnet learner, we somewhere do something like:
I think the
top("resize", size = c(128,128))
should essentiallytake the
uri_column
in the task, and do something like:The dataloader should then simply take these attributes (don't really have to be attributes but something assigned to the column) into account when calling their
$.getitem
method. This way we can pretend that the transformation is immediately applied to the images (making it conceptually similar to other preprocessing such as PCA for tabular data), because as soon as theas_dataloader()
function is called, the transformations are applied.Beta Was this translation helpful? Give feedback.
All reactions