text_html_output_1.png
import glob

import numpy as np

import pandas as pd

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import glob
glob.glob('../input/skin-cancer-mnist-ham10000/*')

images_path = glob.glob('../input/skin-cancer-mnist-ham10000/HAM10000_images_part_1/*')
img_id = []
for i in images_path:
    img_id.append(i.split('/')[4].split('.')[0])

data = pd.read_csv('../input/skin-cancer-mnist-ham10000/HAM10000_metadata.csv')

full_name_cancer_dict = {'akiec': "Bowen's disease", 'bcc': 'basal cell carcinoma', 'bkl': 'benign keratosis-like lesions', 'df': 'dermatofibroma', 'mel': 'melanoma', 'nv': 'melanocytic nevi', 'vasc': 'vascular lesions'}

img_with_class = data.loc[:, ['image_id', 'dx']].to_dict('list')

img_with_class.keys()

img_to_class = {img_id: full_name_cancer_dict[disease] for img_id, disease in zip(img_with_class['image_id'], img_with_class['dx'])}

random = np.random.choice(list(img_to_class.keys()), 10)
{i: img_to_class[i] for i in random}

inter_data_id = set(img_to_class.keys()).intersection(set(img_id))
len(inter_data)