Huy-Ngo / skin-crawler

A web crawler for crawling dermoscopic images of skin cancer.
MIT License
4 stars 2 forks source link

Fix download func and Change class SkinCancerMnist #8

Closed dinhanhx closed 3 years ago

dinhanhx commented 3 years ago

Demo new func

import json
import kaggle

dataset = 'dinhanhx/skin-cancer-mnist-ham10000'
dataset_path = kaggle.download(dataset)
scm = kaggle.SkinCancerMnist(dataset_path)
print(json.dumps(scm.get_img_metadat(0), indent=3))

Output

{
   "Image path": "C:\\Users\\DinhAnh\\.kaggle\\dinhanhx\\skin-cancer-mnist-ham10000\\ISIC_0024306.jpg",
   "Host": "Kaggle",
   "Original url": "https://www.kaggle.com/dinhanhx/skin-cancer-mnist-ham10000",
   "Caption": "HAM_0000550"
}
dinhanhx commented 3 years ago

Yes but if you use that function, you will might have to code more to get what you need. I suggest you use new function export_img_to_flask(). I did put an example in the first comment of this pull request.

For other things, I will change during tomorrow class session.

Huy-Ngo commented 3 years ago

I'll approve this if you resolve your part of #11

dinhanhx commented 3 years ago

I'll approve this if you resolve your part of #11

@Huy-Ngo please checkout this comment