Live data from Hacker News

How many flies are in my apartment?

saml98.github.io

111–120 of 158 posts

Re: How many flies are in my apartment?

#111
post #89

Really interesting work. I love the different models of how a fly moves around. This jumped out at me, though: >If we take a look at the animation now, we can see the flies look slightly more realistic (if not still a bit spazzy) Is "spazzy" a word that's used in different regional dialects of English as a term to just mean jittery? In most of the places I've lived, it's an offensive word.

https://en.m.wiktionary.org/wiki/spaz

Seems like it is indeed much more offensive in the UK. I've never heard it used to mean "stupid" or "incompetent" in America. Here, it describes someone who might be scatterbrained, unorganized, eccentric, and a bit hyperactive or frenetic, but not necessarily unintelligent - you might describe your professor as "a bit of a spaz" without anyone taking offense, though you probably wouldn't say it to their face.

Re: How many flies are in my apartment?

#112
post #76

Earlier quoted context omitted.

I found two flies in my house, marked them, then later found two more flies without marks. I think this means the population of flies in my house is infinite.

This reminds me of the time I found two flies in my house despite the windows being closed. I vacuumed them up (more fun that way) and the next day there were two identical looking flies in the house. Did they get out of the vacuum cleaner? I vacuumed them up again. The next day, same story. The flies were now appearing throughout the day. They all looked the same. Where the hell were they coming from? The windows we…

Another fun thing you can do with flies, and also bees and wasps, apart from vacuuming them up, is put them on a leash. But first you have to freeze them.

Catch one in a cup or plastic bag and stick it in the freezer for about 10 minutes. When you take it out it will look dead, but it's not (unless you leave it in too long.) Being careful not to rip it's wings off, tie a small string or fishing line to one of it's legs.

In a few minutes it will thaw and start to walk around, and then start to fly. You can now walk it around the park like you were carrying a balloon.

Re: How many flies are in my apartment?

#113
post #70

Next step is to set up a grid of ESP32s with MEMS microphones and a FFT routine, stream that data to a server and apply some neural network to get to know the real amount of flies by tracking them individually. Then compare this to the model, and keep improving it until it fits.

I want a mosquito-killing turret [1] that you could put in your bedroom and sleep in peace.

Turns out one exists [2] (in theory—no commercial product a decade later), but the one I was thinking of would use microphones rather than cameras [3] to detect the bloody suckers. Thing is, I can't find any prior research or even hints that people have considered this approach. (The closest I can find is an app [4] that detects a mosquito from ≤10cm away.) Here are some of my guesses for why it's not been done:

    A. Maybe it's too difficult to distinguish mosquito buzz/whine from background noise, even when filtering in only known mosquito frequencies (~400Hz [5]).
    B. Maybe it's too slow to sweep a room with a directional mic that's focused enough to detect mosquito sounds? (Say the turret in one ceiling corner of a 12x12x8ft room.)
    C. Maybe directional mics don't work well for all sound in their cone and so need to be able to "focus" at different distances (by dynamically changing the parabolic dish's shape), thereby increasing the room sweep time?
    D. Maybe the parabolic dish needs to be so big that it just looks ridiculous?
    E. Maybe all of this is possible but the type of microphone is so expensive that it's worth pursuing commercially?
I'm curious what you all think about this. It'd be an interesting thing to try making—who hasn't wanted to make a death ray while simultaneously furthering the fight against humanity's deadliest enemy? [6]

See also this research paper: Detecting Insect Flight Sounds in the Field: Implications for Acoustical Counting of Mosquitoes [7] (I'm pretty sure this is not directional—they hung an attractant 15cm from the mic and I don't see any dish.)

[1]: https://www.youtube.com/watch?v=BKm8FolQ7jw

[2]: https://www.ted.com/talks/nathan_myhrvold_could_this_laser_z...

[3]: I don't think cameras are well-suited to detecting something so small. The "photonic fence" from the TED talk only kinda works by adding a white background behind the bugs so it's really easy for the camera to detect them—not that practical in a normal room.

[4]: https://www.theguardian.com/science/2018/mar/29/mosquito-ear...

[5]: https://www.youtube.com/watch?v=Rcm3rPz_Q94&t=127

[6]: https://mysteriousuniverse.org/2014/08/why-mosquitos-are-hum...

[7]: https://pdfs.semanticscholar.org/a0bf/4fcd478b6214759046a739...

Re: How many flies are in my apartment?

#114

Earlier quoted context omitted.

This reminds me of the time I found two flies in my house despite the windows being closed. I vacuumed them up (more fun that way) and the next day there were two identical looking flies in the house. Did they get out of the vacuum cleaner? I vacuumed them up again. The next day, same story. The flies were now appearing throughout the day. They all looked the same. Where the hell were they coming from? The windows we…

Another fun thing you can do with flies, and also bees and wasps, apart from vacuuming them up, is put them on a leash. But first you have to freeze them. Catch one in a cup or plastic bag and stick it in the freezer for about 10 minutes. When you take it out it will look dead, but it's not (unless you leave it in too long.) Being careful not to rip it's wings off, tie a small string or fishing line to one of it's le…

That’s animal abuse.

Re: How many flies are in my apartment?

#115
post #113
post #70

Next step is to set up a grid of ESP32s with MEMS microphones and a FFT routine, stream that data to a server and apply some neural network to get to know the real amount of flies by tracking them individually. Then compare this to the model, and keep improving it until it fits.

I want a mosquito-killing turret [1] that you could put in your bedroom and sleep in peace. Turns out one exists [2] (in theory—no commercial product a decade later), but the one I was thinking of would use microphones rather than cameras [3] to detect the bloody suckers. Thing is, I can't find any prior research or even hints that people have considered this approach. (The closest I can find is an app [4] that detec…

My acoustically-minded friend had the following to say:

> Off the top of my head, I'm guessing the problem has mostly to do with background noise, and it only working in moderately quiet environments.

> As for locating the source of a sound, there's plenty of research that's been done about that. A directional mic doing sweeps is probably not your best bet, as it would be slow and difficult to cover three dimensions. I would think using an array of microphones and using volume and time delay to identify location would be much easier. Setting them up in a triangular pyramid would, I think, allow you to triangulate a sound's position in three dimensions. The problem with this two-fold: it's still not super precise, and the mosquito's whine is a steady sound, not an impulse where it's easy to identify time-delay between locations. You'd probably need to have an incredibly high sample rate to identify strong enough variations in the sound of a mosquito to effectively use time-delay, or place them far enough apart to rely on relative volume. Maybe a set of microphones you can set up around a room, rather than a single location would work better.

> I think this could be solvable by having the laser aim towards the sound and do a rapid sweep of the area, rather than a precision strike. You could also potentially have the device hit targets that will confirm they are being hit when you are setting it up so it can calibrate to the environment that it's in under regular conditions.

> Another thing to consider is that you would also probably need temperature and humidity detection, as both of those can affect how sound travels, even over short distances.

I then did more research on the killing part of this—the laser. The product I linked above uses two lasers—a low-power one to pinpoint the target and to "listen" for its exact frequency to rule out benign insects and a high-power one to give it instant heatstroke or burn off its wings. But with computer-aimed lasers (even non-burning visible green lasers), accidental blindness is a real concern especially indoors where the beam can unexpectedly reflect off glass or other shiny things. So maybe a narrow, powerful non-coherent flashlight could act as a spotlight and that'd be good enough for a human to still kill it.

Re: How many flies are in my apartment?

#117
post #13

I tried showing the flies using matplotlib.animation.FuncAnimation in a notebook, animating even 1000 frames is slow and it warns the animation becomes too large. Maybe there's a better way to do it? Preferably in a notebook interface.

I ended up writing some very rudimentary HTML canvas + javascript drawing code into the notebook and for my purposes it's fast and does the job. Just to note to others, that this is a possibility within a Jupyter notebook.

One obvious benefit is that it can start rendering "live" and continuously and doesn't have to generate the whole animation before starting to show it.

Re: How many flies are in my apartment?

#118
post #76

Earlier quoted context omitted.

I found two flies in my house, marked them, then later found two more flies without marks. I think this means the population of flies in my house is infinite.

This reminds me of the time I found two flies in my house despite the windows being closed. I vacuumed them up (more fun that way) and the next day there were two identical looking flies in the house. Did they get out of the vacuum cleaner? I vacuumed them up again. The next day, same story. The flies were now appearing throughout the day. They all looked the same. Where the hell were they coming from? The windows we…

That's scary. I used to be a hardcore insectaphobe, but I got over it over the last couple years. Now I don't care that much when I see insects in my house. But it is within reason! I wouldn't want bugs reproducing in my house, that sounds like a slippery slope!

Re: How many flies are in my apartment?

#120
post #64

Earlier quoted context omitted.

This calls it a 'myth', but really concludes that it's hyperbole arbitrarily calling out wasps; they're technically a protected species and you could be fined but.. almost certainly not going to happen for one or two wasps bothering you at a cafe or whatever? https://medium.com/@sophanemwise/the-wasp-killing-myth-in-ge...

I had a friend kicked out of a cafe once for killing a wasp because they didn't want to deal with the situation if the Ordnungsamt was walking by or something. Wasps are the usual example because it's legal to kill flies/mosquitoes and no one wants to kill the other protected insects like bumblebees. The wasps in Berlin are common and pretty aggressive, and have free rein in an awful lot of the chain backeries.

Interesting, but are they justified in that fear do you know?

What I mean is, if this is a commonly believed exaggeration then it could just be that in this case the person believing it wasn't the wasp-killer (or would-be-killer) but the cafe owner. Has your friend ever actually been fined for doing it, or did the cafe owner/manager mention having had to deal with it in the past?

Certainly does seem odd that this law would (a) exist; and (b) be intended to stop this sort of behaviour; and (c) actually be enforced!

Post reply on HN