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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slideshow mode for viewing gallery? #131

Open
faern opened this issue Mar 30, 2024 · 4 comments
Open

Slideshow mode for viewing gallery? #131

faern opened this issue Mar 30, 2024 · 4 comments

Comments

@faern
Copy link

faern commented Mar 30, 2024

Hi! Really nice looking gallery and project 馃憤 The demo album and everything looks really smooth. I like your focus on self hosting and privacy, that's why I came here.

I stumbled on this project when I was trying to find software for turning my tablet into a digital picture frame while it's not in active use. Having it showing random images from my file server and slowly changing between them. So I can passively enjoy and remember past events in my life. I suppose nothing like this is built in? Would you be willing to merge such functionality if someone contributed it?

Any recommendation for other software that would solve this use case?

Absolutely simplest solution, that is not really useful, but still: Add a timer that just clicks the "next" button in the full screen image view. Trivial, but does not add much flexibility.

The best for me personally is if it could be made both to go through a specific event/tag/geographic location slowly, and if it can be run on the full image archive as well. For the latter it would be great if it could be limited to include/exclude certain tags. And it would be great if the selection of the next image would be semi-random but with some decently smart logic. If it just picks any arbitrary picture from the album there will be no consistency at all, one picture from a hike up a mountain and the next a blurry picture at 2am from a party four years earlier in a different country. That would not be nice. But also going through every picture in chronological order would be boring. Then you would be stuck viewing the same hike forever if you were too trigger happy on the camera during that trip. The middle ground is of course the hardest to implement! Staying at each event* for a decent amount of pictures, then transitioning to another event*

* Might be hard for the software to know what one "event" is? It can of course use both timestamp and geotag to correlate pictures. Personally I also sort everything into very hierarchical folders, so having support for #129 would also help the software with knowing what belongs together :)

Thank you for working on this software 馃檹

@xemle
Copy link
Owner

xemle commented Mar 31, 2024

Hi @faern

thank you for your interest and your detailed description.

I stumbled on this project when I was trying to find software for turning my tablet into a digital picture frame while it's not in active use.

Currently HomeGallery does not have a slideshow feature in the view mode of the web app.

Would you be willing to merge such functionality if someone contributed it?

Sure, absolutely. If your need some help to get into it, let me know.

I know you would like your tablet as play back device. But have you tried the cast feature of HomeGallery for your TV? It can cast media in ordered or random order any search to a Google ChromeCast. See cast docs for it.

it would be great if the selection of the next image would be semi-random but with some decently smart logic

Well, the "smart logic" needs to be implemented quite statically at the end. For me pictures transports some moods or emotions and my emotions are changing over time. So the "smart logic" becomes very tricky at the end because the computer can not guess my current (and maybe changed) mood. I would suggest to keep it simple. You define your subset via a search and let the slideshow start chronological or in random order.

... or I did not understand your description, how the "smart logic" can be implemented in simple rules. Maybe you can give another shot how your algorithm would work to be smart?

@faern
Copy link
Author

faern commented Apr 1, 2024

I know you would like your tablet as play back device. But have you tried the cast feature of HomeGallery for your TV? It can cast media in ordered or random order any search to a Google ChromeCast. See cast docs for it.

Interesting. I did not know it had a cast mode. A slideshow mode should probably share a lot of code with that cast mode, since they basically do the same thing, but to different targets. I would personally not be satisfied with fully linear or fully random. But any smarter shuffle could of course be shared with the cast mode also. I don't have a TV and even if I did, I would probably not want to leave it on 24/7, as I intend to do with this "picture frame" I'm trying to create. So it does not cover my usage even if the randomness was satisfactory.

You define your subset via a search and let the slideshow start chronological or in random order.

This would not work for my use case. I don't want to make searches. I want the picture frame to slowly visit my entire picture catalogue (20000+ pictures spread out over 20+ years) but not be completely random. As I described in my initial post, that would not be nice.

Let's say we define a couple of axis to put each picture on. These axis can be: Time taken, geographical position, people in the picture (face detection?), tags applied to the picture etc. Then the next-picture-to-show algorithm can look something like this:

  1. Pick a picture completely randomly
  2. Show 10-20 pictures that are taken close in time to the previous picture (This is what I call showing one "event"). These should preferably be shown in chronological order so you only travel forward in time as you view this one event.
  3. Compute the union of all axis defined above for the 10-20 pictures you just showed: Time, place, people in the picture, tags.
  4. Find a new picture from the entire catalogue where at least one of the axis from the previous event is very similar, the rest can differ completely. If the previous event was a trip to Tokyo in 2010 with Alice and Bob, and the pictures had the tags adventure, bestfriends, sushi. Then find a new picture where at least one of the following is true:
    • Taken around 2010
    • Alice and/or Bob is in the picture
    • The picture is taken close to Tokyo
    • The picture has as many tags as possible overlapping with adventure, bestfriends, sushi.
  5. Repeat from step 2 above, but with this new picture as the base picture.

This allows me to enjoy vastly different pictures from vastly different places and times. But there is some thread connecting them, creating some feeling of continuity. And staying a while in a cluster of pictures taken at the same time.

@xemle
Copy link
Owner

xemle commented Apr 1, 2024

@faern thank you for your reply. I can imagine your "smart logic": Show some "random" pictures from a folder and than select another folder in a "smart" way so that over time topics and scenes change but keep some common characteristics between the folders.

There are following possibilities to select the next folder:

  • chronological order
  • similar place via geo information
  • similar image via similarity
  • same person via face similarity
  • same month/day of month but different year
  • by matching tags

I assume that you are familiar with software development. The tricky part is how to describe your algorithm to act "smart" on the selection. Would you mind to scribble some pseudo code for it? As far as I understand it would be

init:
- select random picture

do forever:
  - show 10 random pictures from the same folder not similar to the previous one
  - select next folder by a random selector above, eg. similar geo location

How sounds that?

@faern
Copy link
Author

faern commented Apr 1, 2024

You talk about folders a lot. But my understanding from #129 is that HomeGallery does not support folders?

Very vaguely I imagine the algorithm to be something like:

event_base_image = random_image_from_catalogue()

do forever:
  event_images = select_ten_random_images_in_timespan(
    start: event_base_image.time,
    end: event_base_image.time + 24h
  ).sort_chronologically()

  event_image_attributes = AttributeSet()
  for image in event_images:
    fade_to_image(image)
    event_image_attributes.append(image.attributes)
    sleep(8 seconds)

  event_base_image = pick_random_image_sharing_some_similarity_with_attribute_set(event_image_attributes)

The attributes are very fuzzily expressed here. But I imagine the attribute set would have one geographical coordinate, maybe simply from the first image, a timestamp that is also just the first image timestamp, a tag set that is the union of all the images and a face set being the union of all faces etc.

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