back to article Is that a phone in your hand – or a gun? This neural network reckons it has it all figured out

Artificial intelligence has the potential to take over mundane, boring tasks such as driving, scheduling meetings and transcribing speech. Now there's another job that can be added to the list: detecting handguns in videos. As the technology improves, it won't be long before police officers or security guards can jump straight …

  1. David 132 Silver badge
    Terminator

    Dick Jones would like this

    AI trying to detect what is, and isn't, a gun?

    The first thing that comes to mind is ED-209...

    "You have 20 seconds to comply."

    1. Anonymous Coward
      Joke

      Re: Dick Jones would like this

      (after putting the gun down...)

      "You have 10 seconds to comply."

    2. Anonymous Coward
      Anonymous Coward

      Re: Dick Jones would like this

      Well, the performance of the fictional ED-209 is already beating the average human American cop, who doesn't even bother to detect a threat before the "Unload All Magazines"-macro kicks off.

  2. Anonymous Coward
    Anonymous Coward

    Does it also have a robot to plant a gun on the suspect afterwards?

    1. annodomini2

      Na it just edits the video and claims they threw it away

  3. Haku

    Can it also tell the difference between a real gun and a Sega light gun?

    Because these cops couldn't:

    https://www.engadget.com/2009/03/04/man-holds-woman-hostage-for-10-hours-with-a-sega-light-gun/

    1. Ian Michael Gumby
      Boffin

      @Haku ... Re: Can it also tell the difference between a real gun and a Sega light gun?

      Well as a Yank...

      1) Cleveland Ohio. There was a 13yr old who was big for his age, looking like he was 17. He was also mentally challenged. He was sitting on a swing with an airsoft pistol where the orange plastic part of the barrel was broken off. This gun, looked real.

      Someone called in to the police and reported him. The person told the 911 operator that the gun was probably fake.

      The police rolled up on him and the kid reached for the gun. The younger officer shot and killed him.

      2) In Chicago, we have gang bangers who are as young as 13 or 14 years old carrying real pistols.

      3) We also have kids carrying airsoft guns and show them to people on the street in an attempt to rob them. (While IL passed a CCW law that took effect Jan 1, 2015, most do not own guns and fewer have CCW permits which is on the rise) So, how do you tell a real gun from a fake gun that was made to look real?

      Every morning, I open up the Trib site to see how many shot and killed over night. (Yes, its that bad in some neighborhoods.) The issue isn't guns but the gang violence over turf. Due to the recent lawsuits and BLM protests, the police are less likely to be aggressive because they want to keep their jobs and don't want to face a civil suit. The gang bangers are more afraid of their higher ups than of the police and there's even video of them taunting the police who were working a crime scene. (Including firing off a gun in an alley a block away)

      But back to your point... you can make a homemade gun that fires a .410 shotgun shell using stuff you can buy at a hardware store. (Google zip gun) And it won't look like a gun.

      In terms of police hostage situations. Police have killed attackers who had small knives and were high on drugs (L. McDonald [Chicago]) or had a base ball bat and was walking towards the police.

      The point is that when you have a hostage situation, even if he's not armed but is in a position to cause harm to the hostage, you will have the police in a situation where they may need to use deadly force. Most times, they'll wait it out.

  4. John Smith 19 Gold badge
    Unhappy

    So at a little above 5fps it can identify that someone pointing a gun at the camera...

    is definitely pointing a gun at the camera.

    Good to know.

    Let's say I'm doubtful any of the others will do much better. BTW 144 million parameters with 64 bit parameters that's a bit over 1GB of data to (potentially) update per frame.

    Now what is the actual quality of the real CCTV these things are meant to be looking through?

    There's a scene in one of the Bond books (Man with the Golden Gun?) when he's going through an automated firing range to test his skills and Fleming comments that the range is normally lit to be "Averagely bad" as IRL things are rarely perfectly lit so you can identify who's holding what

    1. FelixReg

      Re: So at a little above 5fps it can identify that someone pointing a gun at the camera...

      Half that gig. The "parameters" would probably be 32-bit floats, but there are ways to cut that down, too.

      The "parameters" are generally multipliers stashed in a GPU's memory and divvied up in parallel to however many computation units the GPU has (in the 1 to 3 thousand range nowadays for a single, good GPU card).

      1. John Smith 19 Gold badge

        "The "parameters" would probably be 32-bit floats, "

        Probably. I just did it as a quick BOTE with 144 being a bit more than 1/8 of 1024 and worst case assumptions. It's not that big a number and there's that new short reals architecture that British company (XMOS?) is working on to cut it down further.

        These sorts of problems are usually described as matrices but I wonder what the update pattern is like across 16 layers.

        My instinct is not every weight gets updated on every pass so just cycling through every element in the matrix would be very wasteful, as a lot of the time it would A[X] = A[X] x 1. A smarter tracking of what cells really need to be updated could pay big dividends, although I'd be surprised if they haven't already thought of this. The joker would be if the update pattern shifts too frequently to make optimizing it worthwhile over just cycling through all cells.

    2. Ian Michael Gumby
      Boffin

      Re: So at a little above 5fps it can identify that someone pointing a gun at the camera...

      Actually less.

      The trick is to ignore the background and to focus on the people and their immediate surrounding.

      This reduces the amount of image that you have to process and then you can isolate on the hand.

      So first frame, you have the most work to find the people, search for hands and then once isolated, you can track the hands to see if they are holding something in the subsequent frames.

      To your point, yes, in a video or movie, the lighting is usually done to make the gun stand out.

      But suppose we took a video of a group of men standing and wearing dark clothing. Then one pulls out a gun, while another pulls out a cell phone, both black and the phone's screen is dark. They just pull it out and have it at the hip. Do this again with the people wearing dark gloves. Then again in dimmer light.

      You'd be surprised at the results. (maybe not.) I guess the resolution would also matter.

      BTW, on the James Bond Reference.... would the system recognize the gun that was made out of a cigarette holder, and the cigarette case and lighter? (What if he was palming the gun with only the cigarette holder showing? Would a pencil held like that also trigger the system?)

      And of course, the gun Daniel Craig is holding is most likely a Sig Sauer P226 but could be a P220 (You can make out the de-cocking lever and its a full sized frame) It also looks to be an older model since its missing the front rail. [Yes, I own and shoot Sigs. ;-) ]

  5. P. Lee

    >In the future, police officers will be able to skip to the scene of the crime quickly without having to trawl through useless hours of CCTV footage.

    ...and criminals get away with murder using the fiendish ruse of sellotaping random cardboard shapes to their guns.

    1. Paul Kinsler

      ..and criminals get away with murder using

      Presumably this will be sort of a first-pass over cctv evidence: any obvious guns will be found quickly by the system, and those sections checked straight away; and if necessary the whole tape could be looked by eye as presently.

    2. TRT Silver badge

      I note...

      that in the video of the line of cops pointing guns at the camera, that the score for the black cop was much, much higher than the others... just saying.

      1. TRT Silver badge

        Re: I note...

        I also note how it picked up on Samuel L Jackson holding the gun, but missed the two white dudes in the background.

        Is it rAIcist? Or does this reflect a bias in the training routine?

        Anyway, how would it cope with this?

        1. O RLY

          Re: I note...

          "I also note how it picked up on Samuel L Jackson holding the gun, but missed the two white dudes in the background."

          I think you'll find that the background gun-wielders are a man and a woman. There's some irony in this, I'm sure.

          1. TRT Silver badge

            Re: the background gun-wielders are a man and a woman...

            Can a woman not be a dude?

            1. Anonymous Coward
              Anonymous Coward

              Re: Can a woman not be a dude?

              I heard that there is at least one case of "dude looks like a lady".

        2. Voland's right hand Silver badge

          Re: I note...

          Is it rAIcist? Or does this reflect a bias in the training routine?

          Do not think so - the guns in the background are not in focus and fairly low res. There is no way to get a high confidence rating on them using an image recognition algo. We know and understand it is a gun based on character behavior. If you take the frame from that movie (easy to do - all of us have a copy) at DVD SD standard res there are not enough pixels to work with.

          Now the the higher confidence ratio on the police squad photo does look fishy. Interesting what data did they feed this.

  6. TRT Silver badge

    How did it fare...

    when they showed it a video of ET?

    1. Haku

      Re: How did it fare...

      Original or bastardised remastered?

  7. Simon Harris

    Can it detect someone armed with a pointed stick?

    Or a piece of fresh fruit, come to that.

    1. TRT Silver badge

      Re: Can it detect someone armed with a pointed stick?

      https://www.youtube.com/watch?v=ZqISLI2UQMY

    2. 's water music

      Re: Can it detect someone armed with a pointed stick?

      No silly, they don't need a a computer to detect people with sticks. They have meat sacks who can do that already.

    3. Ian Michael Gumby
      Devil

      Re: Can it detect someone armed with a pointed stick?

      Fresh fruit like a bunch of grapes?

  8. TRT Silver badge

    The original paper...

    Just what is going on there?

    Their videos were "Mister Bin" and "James Bon"?

  9. Chez

    "Only common types of handguns like revolvers, automatic and semi-automatic pistols, six-gun shooters, horse pistols and derringers were considered."

    Horse pistols and derringers common? You crazy brits.

    1. TRT Silver badge

      Spaniards, actually.

      1. Chez

        I'm American. You're all just foreigners to us, you're lucky if we distinguish between the tea-drinking-foreigners-with-funny-accents and the talk-like-mexicans-but-don't-make-tacos foreigners, especially since neither type is allowed to own guns. Probably because you're all commies.

        (I jest, of course - I read the article too quickly. Except for the gun part, it's a shame you don't get those, they're wicked fun.)

    2. John F***ing Stepp

      I think I have a derringer; and if I had a horse, I would definatly buy it a pistol.

    3. David 132 Silver badge
      Coat

      Horse pistols and derringers common? You crazy brits.

      We have the NHS, so access to horsepistols is unlimited & free, although the casualty department can get a bit busy (and as for the causality department, well, you have to make the appointment before your unexpected accident)

  10. Alistair
    Windows

    she was holding a GUN!

    yup, that 8 year old playing in her backyard with her cousins was holding a gun your honour, The AI said so. Thats why they shot her 13 times in the back.

    /sarc

  11. Anonymous Coward
    Anonymous Coward

    Doesn't need to be very accurate for the suggested use

    So if it thinks it sees 10 guns in 24 hours of video but only one is real, it only wastes about a minute or two of your time showing you sections of the video where there aren't guns.

    It might have a problem in those states where open carry is allowed - it will see guns all the time, because idiots who think it is the old west will walk around with a holster on their hip, just because.

    1. Mark 85

      Re: Doesn't need to be very accurate for the suggested use

      because idiots who think it is the old west will walk around with a holster on their hip, just because.

      There are an abundance of idiots here but I seldom see anyone open carrying. Maybe the preferred is concealed carry?

  12. Captain DaFt

    So if you hold a gun like a gun, it IDs it as a gun... clever.

    So just hold the gun cradled in your palm and stare at it while walking... does it now ID it as a smartphone?

  13. Flywheel

    Two things

    Artificial intelligence has the potential to take over mundane, boring tasks such as ...scheduling meetings and transcribing speech

    I'll buy that for a dollar - I can send it to my company meetings while I get on with some useful work. FFS.

    And as regards cameras, I can heartily recommend the Zenit Photosniper. No, really officer, it's a camera!

    http://camerapedia.wikia.com/wiki/Zenit_Photosniper

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like