cpietsch / vikus-viewer

Explore cultural collections along time, texture and themes
https://vikusviewer.fh-potsdam.de/
Other
136 stars 45 forks source link

Dropping performance after clicking first image #2

Closed Pin0 closed 5 years ago

Pin0 commented 5 years ago

First of all thank you for this great viewer, I'm really loving the potential of this!

I'm trying it out with a dataset of around 11000 images. And it all works really smooth after the first page load. However, performance drops once I clicked one of the images to see the detail view and zoom out again. (latest chrome on mac 10.14) Please see my example here: http://nijdam.nu/vikus-viewer/

I did checkout out the tsne branch to see if that might improve things, but that made no difference.

On a side note, do you have a roadmap? because I'm actually wanting to sort on two columns like you do on https://uclab.fh-potsdam.de/coins/ and on other examples you also have a tsne and grid layout I'm wanting to incorporate. (give someone a finger and they want the whole hand :-)

Also I commented out the if statement on line 470 in canvas.js because otherwise I did not have any data in the detail page. (now I'm writing this I realize it's because my columns in data.csv are not prefixed with a _)

for (field in selectedImage) {
    //if (field[0] === '_')
        detailData[field] = selectedImage[field]
}

I understand there is still some work to do, and I know that you do this on a voluntairy basis so thank you for this! Really looking forward to future releases.

EDIT: It has something to do with the line I changed to make the detail view working, really weird. Performance is ok when I revert canvas.js but now I have no data in the #detail view.

EDIT2:

I did not notice the columns year, id and keywords are automatically available as _keywords etc. I thought since I have a column keywords in data.csv the source should also be keywords, but I was wrong, source should be _keywords.

Now it looks like it is working fine, including zoom in and out.

So the only question I have left is when the other layout options will be available :-)

Sincerely,

cpietsch commented 5 years ago

Hey @Pin0 , great to see the viewer in use with an fresh collection! As you already found out about the quirks of the detail data: it is not optimal right now how the metadata is handled. I wanted to seperate the optional data from the required fields like year, id, and keywords, but the architecture how the data is bind to the entry is - let's say - a bit lazy. There is a new version in the making which completely separates the internal logic from the data.

Back to the layout question: There is a TNSE branch working with an optional data*.csv file which provides a pre calculated x,y layout. That layout can be created using these 2 scripts: https://beta.observablehq.com/@cpietsch/batch-imagenet-activation and https://beta.observablehq.com/@cpietsch/t-sne-for-imagenet-activations using tsne on image similarity.

Unfortunately https://uclab.fh-potsdam.de/coins/ is just inspired by FW4/VIKUS Viewer - not made by me. But yes, those layouts were on my todo list when creating the project years ago and when this project hit me by surprise I wasn't so motivated anymore to implement the 2 column layout.

It is not absolutely clear where I go from here, but it great to see that other people are able to use this viewer for their collections - and contributions are very welcome ;)

Pin0 commented 5 years ago

Hai @cpietsch,

Thanks for your reply. It was fun trying out vikus-viewer! If time permits I'll try to experiment with it some more, especially the tsne branch. Good to know you are separating the logic and data, this will make it much easier to add different data sets to the viewer and possible group the images on other columns besides the now hardcoded year.

I might look into your code more closely in the future and possibly do some pull requests if needed. However, I have to update my skills on WebGL/canvas and all to make a real contribution.

Keep up the good work, I think you really have a nice tool here with a lot of potentials!