You can download the synset ID's of the 1000 classes here (or other github sources). Then use nltk package in Python to get the hypernyms (parents) of each class. The following code saves the 6 most super-ordinate categories for each class label. I downloaded the *LOC_synset_mapping.txt* file from [here][1]. from nltk.corpus import wordnet as wn import pandas as pd import numpy as np #----------------------------- #read synset ids for classes: #----------------------------- map_fname=base_dir+'/LOC_synset_mapping.txt' synset_ids_1000=np.zeros(1000) l=0; with open(map_fname, 'r') as f: for line in f: synset_id_s = line.split()[0] synset_id=int(synset_id_s[1:]) synset_ids_1000[l]=synset_id l=l+1 #------------------------- #create the list of parents for all classes: #----------------------------- all_list=[["-" for j in range(7)] for i in range(1000)] for i in range(1000): synset=wn.synset_from_pos_and_offset('n',int(synset_ids_1000[i])) hyper_list=[] while synset.hypernyms(): synset = synset.hypernyms()[0] hyper_list.append(synset.name()) hyper_list.insert(0,'null') hyper_list.insert(0,'null') all_list[i][:]=hyper_list[:-7:-1] df=pd.DataFrame(all_list) To see parents of the a specific class, e.g. 11th class: df.iloc[10] 0 entity.n.01 1 physical_entity.n.01 2 object.n.01 3 whole.n.02 4 living_thing.n.01 5 organism.n.01 6 animal.n.01 to see number of different unique labels at a specific depth, e.g. 3: df.iloc[:,3].value_counts() whole.n.02 946 substance.n.07 22 solid.n.01 16 geological_formation.n.01 9 person.n.01 3 sign.n.02 1 signal.n.01 1 shape.n.02 1 substance.n.01 1 [1]: https://www.kaggle.com/competitions/imagenet-object-localization-challenge/data