Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code doesn't run #1

Open
OlgaMatt opened this issue Jan 18, 2019 · 1 comment
Open

code doesn't run #1

OlgaMatt opened this issue Jan 18, 2019 · 1 comment

Comments

@OlgaMatt
Copy link

OlgaMatt commented Jan 18, 2019

Thanks for uploading this btw!

I've been trying to go through this, because I'm going a similar project, but I get stuck on one line of code.

XHist_train = [color_frequencies(x[0]) for x in X_train]
XHist_test = [color_frequencies(x[0]) for x in X_test]

I'm working in jupyter notebooks, and these two lines of code take forever to load, and they haven't loaded at all. I'm using a dataset of 50 images in total.

Why is it taking so long to load? I haven't managed to get an output yet because the lines won't load.

Thanks in advance!

@manena
Copy link
Owner

manena commented Jan 18, 2019

Hello Olga,

I haven’t seen this code in a long time. I was also working in Jupyter and I think it took a long time for me too (I don’t exactly remember, but working with images is very consuming).

If I remember well, the function called converts the image into a histogram. Yo can check if there is a way to optimize that function.

Also, you can try to run the function on just one image to see how long it takes with different images... yo can try to somehow make the images lighter by changing their size (keeping the general proportions of colors and light).

Let me know if I can help you further with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants