I’m following lesson 1 and working on the lesson-2 notebook. I successfully trained a model on my own image dataset and everything seems to be working fine. After loading a cleaned dataset from a csv
db = (ImageList.from_csv(data_path, 'cleaned.csv', folder='..') .split_none() .label_from_df() .transform(get_transforms(), size=224) .databunch() ) learn_cln = cnn_learner(db, models.resnet34, metrics=error_rate) learn_cln.load('stage-2');
I try to train the model again to see if the error_rate would improve with unwanted images filtered from the dataset:
This is what I get in return:
as opposed to:
when I train the model with the folder directly instead of a csv.
Please note that there is a file
models/stage-2.pth as well as
cleaned.csv. I can also use the
learn_cln to predict a category:
img = open_image(cwd + '_test-predictions/pred-5.jpg') img
pred_class,pred_idx,outputs = learn_cln.predict(img) pred_class
This outputs a correct label.
I also tried removeing the learn rate limits without any change. If necessary, I can post my file / folder structure. I am running the notebook on AWS via SSH. Is anybody able to help me with this? Thanks a lot in advance!