Kaggle dataset input into my code

I am working on science fair, color detection. Ive gotten the red and green differentiation, but my science fair teacher said that the judges will not even look at my project if it is too basic. So she suggested feeding a dataset full of hundreds of colors into the program. can someone help, this is due in a few days and i need help. This is greatly appreciated thank you.

how can i use this? my teacher wanted me to feed this dataset into the program,

please help

Requires signup to download the dataset, can you share it here?

Which elements of the dataset will you use , name, hex, RGB ?

Show how you would use a colour.

Yes!

color_names.csv (66.3 KB)

also i will certainly need the name and rgb, when you say hex; you mean hexadecimal? i dont think that is needed for my project

Also my program is connected to my phone, so I can take a picture of any object, and when you touch a pixel it tells you the color. I want to use this dataset to get more accurate colors and potentially place in my sci fair

Here's a project I had in stock, with a file of color names and codes:

It has a Gallery link to the project.

1 Like

Here is a quick example of how to return a colour from your csv (I removed the header row)

colorNames.aia (27.9 KB)

image

oh my gosh thank you! will this work for all the colors listed in the file? so if i snap a picture of some fruits will it show me the exact color, like in the file?

like is there a way to input the excel spreadsheet into my program

I do not know how you will compare the colour of the fruit with the colours in the dataset, but if you are getting RGB values from your photo, then you can look for a match in the dataset.

What excel spreadsheet ?

The one i sent to you, the color names

Oh i think i got it, nevermind ! I will run the code with the colorfile code and let you know how it goes! greatly appreciated. :smile:

You do need to bear in mind that there are a possible 1.67 million colours available in RGB, you only have a dataset of 1100...

That is alright, i just did not want to have only 10 colors

wait how do you get File1? Do i make a new label?

Drag in a File component from the Storage drawer.

1 Like

Hey, for some reason it is not reading the file? I'm not sure why, I tried everything lol

You need to show your relevant blocks, or review the blocks that I previously showed, which set the File component's filescope to Asset, which will then provide the path to read the file in the media folder (assets) of your project.

image

This is all my code right now..