Created
June 13, 2020 13:57
-
-
Save Zakaria-pro/61798d03c9aecd0dbfe8bbb2bfb51d80 to your computer and use it in GitHub Desktop.
Data_understanding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put all the images into a list | |
listOfImageNames = [] | |
for dirname, _, filenames in os.walk('/kaggle/input/insulation-joint-training-set-prorail/trainset_insulation_joint/images/'): | |
for filename in filenames: | |
#print(os.path.join(dirname, filename)) | |
listOfImageNames.append(os.path.join(dirname, filename)) | |
#define a function that display an image and it's label knowing the indice of this image | |
def display_image(indice): | |
print(df[df['label'].index==indice]) #print the label of the image | |
display(Image(filename=listOfImageNames[indice], width=700, height=700)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment