this post was submitted on 30 Nov 2023
66 points (100.0% liked)
Programmer Humor
19486 readers
566 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
And you are seriously trying to kill the messenger.
And I'm saying there's ALWAYS a visual clue/cue, always. Either the bike is there one minute and gone another, or a fight breaks out and trashes the place from the fight. In the vast amount of cases, there's always a visual difference.
And in this case we're talking specifically about a bike, going missing.
Ok but the text that you replied to, that you quoted, was "If the event lasts only a moment and leaves no visual cue (e.g. an assault), then binary search is practically useless." Emphasis mine. If you'd started out saying "there's ALWAYS a visual cue," then you likely wouldn't be getting dragged, but you started out arguing from this position without clarifying it, which makes it seem like you didn't know what you were talking about. You can't say that you can simply look for visual cues when the other person specified that there were none.
Last time I checked, I'm allow to disagree with a comment someone made, and argue the opposite. Just because they say 'no visual cue' does not mean that is no visual cue.
Why, because you say so? Yes, I can. Of course I can.
Its called "disagreeing" with what the other person is speaking of, and countering. Its a discussion.
It literally, explicitly does, because they are talking about a hypothetical situation where no visual cues are left. If no visual cues are left, then there are no visual cues to see.
Okay. I should have been extremely specific. You cannot rightly and correctly say that there are visual cues that could be found when the other person explicitly says that there are no visual cues to be found, because in the hypothetical situation that they've brought up, there would be no visual cues to find, and so while you are physically capable of stating the phrase "just look for the visual cues," or some variation thereof, you are incorrect in the assumption that there would be visual cues to find.
When somebody says "you can't say" followed by a statement that's incorrect, they aren't trying to tell you that you are physically incapable of saying that statement; rather, there is an implicit "correctly" or "honestly" between the "can't" and "say."
No, I am not. I'm disagreeing with that, and my comments are stating as much. I'm allowed to disagree with what someone is saying.
You seem to talk about different things when you say "visual clue". Yes, there will be a small duration in the video where the event happens and maybe a short aftermath. That's not a visual clue, that's the thing you're looking for. What all others mean by visual clue is a definite indicator that you can see when picking any random frame in the video that tells you if that frame is before or after the event. That allows you to exclude all other frames from your search, reducing your search range by half.
A stolen bike, a broken window, your examples that trash the place or end up with a crowd of people in the area, all leave such a visual clue. At any random frame you can check if the bike is there or not, the window is broken or not, etc.
But let's say you have footage of the street facing CCTV and you need to find at what time the suspect left the scene (crime happened somewhere else). There's nothing that tells you when looking at the halfway point if the suspect already passed or didn't. You still have to look at both sides of that point in time.
The classic example for binary search is looking for a word in a dictionary. You open it halfway and see if the words there are before or after the one you're looking for. Then you know which half of the dictionary you need to look in next. Then you use the same method for that half and so on.
But what if someone highlighted a word in the dictionary and you don't know which word? Binary search is useless. You have to skim through the whole thing until you see it.
I believe what you stated is partially incorrect, as you don't look at just a single frame, you compare it to the frames before and after as well, you search for pattern changes.
I stand by what I said. I don't believe you're seeing the whole thing (pardon the pun).
Five months later, and I'm not going down this rabbit hole again. I'll just leave it at agree to disagree.
Even if you're looking at a range, it still won't tell you anything except that you found the guy or you didn't find the guy. If you didn't, what's the next step? (In the find when the suspect passed in front of the camera scenario)
Absolutely not true. Guy walks bye and shoots someone well offscreen. Momentary action with no visual cue before or after. Why are you arguing this useless point?
The person dropping to the ground dead would be the visual cue.
...well offscreen... wow
If its all offscreen, then WTF are we bothing to talk about?
Is this on purpose?
The shooter is on screen the victim is not.
This is on purpose isn't it. You're fucking with me.
Sorry, I thought you were saying that the guy walking by was off screen, and the person on screen was shot, since the focus of the conversation was about binary search based on what's on the video.
In that case the shooter, walking up and then holding up a gun and pulling the trigger would be the marker, as well as the puff of smoke, for the binary search, which could be done with AI, if not human eyes.
Also they would know the approximate time of death, so they can use that to extrapolate a range on the video that they need to binary search on. I'm pretty sure this is normal police work that I'm describing at this point.
Having said that, that's one hell of a hypothetical you made there. At some point you could definitely come up with an example of when a binary search wouldn't work, but not based on what the OP was discussing, or what others were discussing about two people having a fight on camera.
If you skip to after the smoke has dissipated, you cannot gather enough information to know that you need to rewind. A binary search is useless in this scenario.
Depends on how long the smoke remains in the air.
If it's not "for the duration of the rest of the video," then binary search would be useless
That's not true. It only has to be long enough to be detectable, by landing on a strip of video that it exists on. It'll be harder, definately, but still doable.
Maybe I have no understanding of what a binary search is. My understanding is that you check halfway through the video, see if the thing has happened yet, then skip halfway to the end if it hasn't. Check again, skip again. When you see the cue that the event has happened, you rewind to halfway between the latest point where the event hadn't happened yet and the earliest point when it has. Keep doing that and you can pinpoint the exact frame where the event happens in a matter of minutes.
Binary search would be largely useless in cases where you have a good chance of skipping right past the event. If the video is an hour long, and the event happens 34 minutes in and leaves a visual cue that lasts less than 11 minutes, then binary search does not find the event. At that point, watching the video fast forwarded would be the way to go, and that's not a binary search, that's just watching the video.
So I should correct myself: the visual cue doesn't have to last the remainder of the video, it just needs to last until one of the points that you check. Which still makes it not useful for things that don't leave visual cues that last more than a few minutes, because it cannot find most of those events if they happen at a random time in an hour+ video.
No, you're not the one who has no understanding of what binary search is.
The event has happened, or the aftereffects that the event happened. That is my point, the aftereffects matter as much as the event itself. As long as the 'after' looks different than the 'before' for any reason, that is a marker to give you an indication on which way to go, rewind, or advance.
And yes, either the effect or the aftereffects has to last long enough to be noticed by humans, less long by AI (faster to detect changes than humans). But the vast majority of events, when humans are involved, leave long aftereffects usually. Yes, not 100% of the time, but usually.
Many things change things. A bit of smoke in the air might have been from a gunshot that happened 10 minutes ago, or it might have been from a cigarette 15 minutes ago. Binary search relies on changes that indicate a specific thing has happened–a broken window, a bike no longer there, blood stains on the street. Anything undetectable by humans would still be useless to AIs. A bit a smoke? Could have been a gunshot 3 minutes ago, could have been a cigarette, could be fog, could be a vape. Even the things that AIs are truly useful for, like interpreting video compression artifacts, wouldn't help, because any number of things can cause compression artifacts. How could it tell what pixels are slightly off color because of a gunshot 3 minutes ago, and what pixels are slightly off color because someone walked past the camera?
At that point, just feed the entire video to the AI and have it tell you when it sees guns or puffs of smoke or hears screams. Binary search is useless when you can just have a machine watch the entire video in one sitting over the course of five seconds and tell you when the interesting thing happens.
Actually, an AI could determine the difference between those, based on shape, location, and opacity, etc.
Is there a point where one technique works better than another technique? Sure. I'm not arguing that. But if you're dealing with a very long time, you'd still want to do a binary search first.
Depends on how long that tape is, which is what was being originally discussed by the OP.
A binary search assisted by AI in determining the point in the tape where the effect happened quickly is still a very fast way of doing so (assuming the tape duration is very long), as alluded by others in other topic trees in this topic.
Lmao now I know you're fucking with me
Yeah lemme spend three weeks training this AI on the difference between gunsmoke, cigarette smoke, vapes, and fog in this specific alley. Oh, y'all already found the killer because someone just watched the video? Well my point stands, the AI could do it faster
Once it's trained
In another week
Oh shit, it thought that guy's cell phone was a gun. See you in another month!
Um, I was being completely serious. Having AI determine shapes/opaqueness is a simple matter for it. And I'm assuming the training would already be done before the event happens, over time.
You don't think crime forensics labs won't be training AI to do these kind of detections going forward? Really?
(Maybe its a matter of people not truly grocking what AI will do and how it will change things, going forward. /shrug)
Having an AI search for shapes an opaqueness is still totally useless for a binary search if those semi-opaque shapes happen for 10 minutes 34 minutes into an hour long video
Again, you'd just feed the whole video to an AI, you wouldn't have it do a binary search
Well one of those shapes would happen at the time of the event though, so it's not useless. One of those would be a gunshot smoke, and could be flagged for review.
One day, when computers and AI are powerful enough, this will be the answer, but even then I would like to think behind the scenes they would use a binary search to speed up the processing time.
The time of the event doesn't necessarily coincide with any of the times that you're checking. That's the whole point of looking for visual cues. Again, if the event happens 34 minutes into the video, and it leaves AI detectable visual cues for 10 minutes, the AI will never find it using binary search. It will skip to 30 minutes, see nothing, skip to 45 minutes, see nothing, skip to 52:30, see nothing, skip to 56:15, see nothing, and fail at some point when it can't divide the video further. Binary search would fail in this scenario. It's not just useless, it's an abject failure, and the AI was a waste of processing power when you could have scrubbed forward five minutes at a time instead. That would have found the visual cue, but would not be a binary search.
But one of them potentially will though. A gun firing leave smoke behind.
Even if there's other smoke in the video, you're looking at 5 minutes of a 24-hour video, and not scanning through 24 hours of a video manually. And an AI could use a binary search to find any moments of smoke (or not). Not saying it's a one-size-fits-all solution, just one very important tool in a toolbox.
I don't mean to be rude, but I'm exhausted talking about this topic, and so if you don't mind, I'm just going to bail at this point.
Thanks for keeping it civil.
If we're talking about a 24 hour video, then we definitely can't find every instance of smoke. If there isn't any smoke exactly 12 hours into the video, then it throws away the entire first 12 hours. Any evidence that could have been found in those 12 hours is gone. A binary search throws away half of the information at a time. It super can't locate multiple instances of something happening.
I've been wrong in arguments before, it feels awful. The best things to do are either address the misunderstanding in the original comment, or not engage with anyone else who feels like arguing more. One thing I miss from Reddit was being able to toggle notifications on a per-comment basis.
Well, I'm not wrong, so I don't worry awful it from that angle. Just feel that people are not arguing/conversing in good faith.
The misunderstanding of others assuming differently than I was discussed elsewhere in the comment thread. To reiterate, I believe my assumptiion is the correct one based on how the world is, and not hypotheticals.
As far as not arguing more, it gets to a point of where some moderation should be happening, because its pretty evident at some people that people are group thinking attacking someone just for the lols if nothing else, and I say that because when I explain why I don't think I'm wrong they don't answer my point, but instead just insert their own new points in the conversation.
Otherwise, I feel the need to defend myself, especially when people say I'm saying things I'm not saying. "Standing up to bullies" sort of attitude. It sucks, but Humanity can be assholes sometimes.
I'd really like to stop talking about this now, I'd appreciate you not responding to this comment, unless you really feel the need to. Take care.
In which case there are visual cues and it's something that the comment you argued with acknowledged would be eligible for binary search
Nobody said otherwise, you're arguing with strawmen
Yes, they have. They've used it as a reason why a binary search would not work, that the event duration would be too short to be detectable.
And that's not a strawman, that's making my point, that its not just the event, but the aftereffects of the event, that makes a binary search possible.
You are trying really hard for some reason to fit a binary search into a discussion about a situation where it clearly does not belong. Very weird but very passionate I applaud you.
The actual/origiinal OP talks about a binary search.
Changing the focal point of discussion to fit your narration is not intellectually honest.
You're trying to change the discussion focus point to kill the messenger.
Seriously, my guy. Are you having a mental breakdown or what? You're accusing rational people trying to correct you of being botnet responses, you're constantly moving your goal posts and accusing everyone else of doing it, you're being intellectually dishonest and accusing everyone else of doing it.
You are being transparently and irrationally defensive all because you can't admit you made a mistake. Surely you can see this is no way to go through life and no way to spend your time, right? I'm worried about you.
Because you can judge that from tax off of an Internet comment, right? Don't be insulted, I've at least treated everyone here with enough respect when I've conversed with them not to accuse them of being mentally ill.
Go find my conversation with others about the Falkland Islands and you'll see the quote that I'm speaking about, that made me make that statement.
No, I haven't, and others have. I stand by what I've said.
My own words phrase exactly the same way coming right back at me. Hmm, I wonder where I've seen that before?
What mistake, exactly? That a binary search never works? I've never said that. That a binary search works 100% of the time? I've never said that either. What I've stated is that the majority of the time a binary search would work.
Are you advocating that a binary search never works?
I'm retired, I have time on my hands, and I'm a computer nerd, so I spend that time on the Internet, like I suspect many other people do as well. And I enjoy arguing a point when I feel I'm right, I enjoy a good discussion, though these days that rarely ever happens on the Internet.
Why are you trying so hard to discredit me, to kill the messenger? I appreciate your concerns, but I'm doing just fine, we're just arguing a point on the Internet.
Ok. I initially responded that I didn't even read your response, because I didn't, and I just asked again if you are OK. And I really meant it.
But that seemed rude, so I deleted it, and I read your comment. I'm going to skip over the earlier parts and move to the end of your comment.
Ok! That makes me feel better. If you're just mixing it up and having fun arguing on the internet, I get it. You've got time and you're having fun. That's cool, man. It just comes off a little weird to people, I feel.
I, while I respect what you're saying, don't want to spend time arguing the point. If I could, I would just like to explain to you what my understanding of the situation is, and then, if you disagree, I'll respect that.
Binary search is effective for many things. However: imagine a camera on a blank white wall that was recorded for 24 hours.
At some point during that 24 hours, two people crossed in front of the wall that was being recorded, and one punched the other and then ran out of frame, and the other person ran after them out of frame. The entire exchange was on screen for only a few seconds. The wall was completely unchanged by the encounter.
In that very particular instance, rare as it might seem, binary search will not be more efficient for locating the footage. Does that make sense?
I appreciate your politeness, sincerely, and thank you for the removal.
The level of toxicity being thrown at me by people (not you) for just discussing when a binary seach is effective or not, that does harm someone, especially when one is just seeking conversation, but that's the Internet, not much you can do about that, except ask people to stop (which usually gets more toxicity thrown at you).
Well, people are not used to someone defending their position well (right or wrong). And talking about being used to train bots tends to make others think of tinfoil hat scenarios, so I get it. But it does really happen in real life (I know).
As someone who has written binary searches before, I understand that the duration of the event is important, and that short durations make its search effectiveness less than long durations.
But the point I keep hammering on is that its not just the duration of the event that matters, its also if the environment the event happens in and how it changes at the point of the event, for any reason, matters. All you need is for the static image to change from one thing to another, for ANY reason, at the point of the event. And when it comes to humans, that is the norm (change).
Yes, you can describe a scenario where a binary search would not work, but it most likely wouldn't be a real-world event you are describing (like who would point a camera at a small section of wall and just that small section?).
And a final word for anyone who gets to this point and reads this (this is not directed at you personally). ...
I would ask others to consider if those who are running things would want (or not) the general public to realize binary search's potential effectiveness in crime resolution, and demand it being on video tapes when a crime happens, and how they may react to those who advocate for its use.