Closed andysingal closed 1 year ago
I was not able to replicate the issue, it worked fine for me. Are the image files accessible , can you break the function - vector_extraction(resnetmodel, img) once and check if you are able to extract features first?
I was not able to replicate the issue, it worked fine for me. Are the image files accessible , can you break the function - vector_extraction(resnetmodel, img) once and check if you are able to extract features first?
Thanks for your instant reply, the images files are accessible. I tried running on Kaggle and it works fine when running on 5000 of them but gives issues when running on the whole dataset. Here is the link to my code: https://www.kaggle.com/code/alphasingal/fashion-dataset-recommendation
-dataset-recommendation
The problem is occuring in this part:
%%time
import swifter
# Applying embeddings on subset of this huge dataset
df_embeddings = df #We can apply on entire df, like: df_embeddings = df
#looping through images to get embeddings
map_embeddings = df_embeddings['image'].swifter.apply(lambda img: vector_extraction(resnetmodel, img))
#convert to series
df_embs = map_embeddings.apply(pd.Series)
print(df_embs.shape)
df_embs.head()
The code is available on Kaggle, i would really appreciate if you can look into it. Thanks, Ankush Singal
So in this version of data, there is an error with the 6696th data point, If you avoid that it will create the embeddings as you wanted
Hi, While creating embeddings for the whole dataset it fails:
i get the error:
i even tried gpu but it does not work. Have you tried working on it? Looking forward to hearing from you Thanks, Ankush Singal