“Fastai lesen Daten aus Bildordnern” Code-Antworten

Fastai lesen Daten aus Bildordnern

In order to get the labels you can use the parent_label 7 . This takes the name of the parent directory of an imagefile and uses that as the label for that image.

You have to plug this into your datablock by assigning this function to the get_y argument like get_y=parent_label.

For splitting, the simplest way would be to use GrandparentSplitter() by plugging it to the datablock as splitter=GrandparentSplitter()

You can create your own functions to do both of these tasks but since you are just beginning ro learn I would suggest you to use these built-in functions.

https://docs.fast.ai/tutorial.datablock.html in image classificaiton
Clear Copperhead

Fastai lesen Daten aus Bildordnern

In order to get the labels you can use the parent_label 7 . This takes the name of the parent directory of an imagefile and uses that as the label for that image.

You have to plug this into your datablock by assigning this function to the get_y argument like get_y=parent_label.

For splitting, the simplest way would be to use GrandparentSplitter() by plugging it to the datablock as splitter=GrandparentSplitter()

You can create your own functions to do both of these tasks but since you are just beginning ro learn I would suggest you to use these built-in functions.

https://docs.fast.ai/tutorial.datablock.html in image classificaiton
Clear Copperhead

Ähnliche Antworten wie “Fastai lesen Daten aus Bildordnern”

Fragen ähnlich wie “Fastai lesen Daten aus Bildordnern”

Weitere verwandte Antworten zu “Fastai lesen Daten aus Bildordnern” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen