Hi,
I have searched multiple topics in this forum, and none of which seem to answer my question. As such, I have reposted this up, hopefully, with detailed screenshots to provide a better understanding!
My file directory structure is as such:
As you can see, there are 2 distinct folders, called Train and Test… What I want to do, is to train the model using the train dataset for both training and validation (which should comprise 20% of the training dataset), before predicting out on Test set without any labels.
Therefore, based on this, my ImageDataBunch.from_folder command is seen as such, but note that under class labels, Test becomes 1 class in addition to the 2 classes that I really want.
In order to go around this problem, I edited it to this:
So far, this edited command seems to work… as it gives me 2 class labels. However, the problem comes later downstream…
One of the most common solution that occurs in the forums, is to set get.preds(is_test = True), but as you can see in FastAI V1.0, this does not seem to work anymore. I also shift-tab to see what arguments are available and none of which reflects a is_test = True parameter.
So, I went and searched… and found this proposed solution which seems to work… until I checked the shape:
Note: That in the Test folder, there are only 179 files for prediction. Whereas, the shape here is 509 images. This is from the training dataset ((444 + 193)*0.8).
I am currently stuck and have been stuck for many hours. Could someone please advise me on how I should go about solving this? @jeremy
Also, if anyone could provide me with some guidance on how I can print out Test Images with the associated predicted class labels, I will be eternally grateful!
Thank you!