3
$\begingroup$

I was thinking, what if we could combine Artificial Intelligence (Neural network for image recognition), computer hardware and a security camera for identify any breaking into our backyard at 12:00am - 8:00am? Of course my current knowledge leads me to only a simple question. So, in order to have a general idea:

  • ¿Have been this already solved using a commercial or free software?
  • ¿Can this be done using TensorFlow?
  • ¿Is there any free set of images with millions of them to teach any AI distinguish between a man and another moving object?
  • ¿Approximate hardware requirements for doing this?

If this question could be silly please mark it as off-topic. I based this idea on autonomous driving car, they can both recognize images and drive at the same time. Unless they have within a super computer I guess maybe the previous idea can be fulfill.

Update 1: I found this Can ConvNets be used for real-time object recognition from video feed? but I guess it could be outdated. Right now I'm in the land of "maybe" (lack of knowledge).

$\endgroup$
  • $\begingroup$ Welcome to AI! From what I've been gleaning off of the DL folks, while you might need robust computing to train the algorithm, once it is trained, it would be able to run on a much less robust system. I'd think the real problem with training in this regard would be the dataset. I'm guessing frequency of break-in attempts is fairly low, and these types of systems need a huge sample. $\endgroup$ – DukeZhou Dec 7 '17 at 18:36
  • $\begingroup$ So basically the problem lays in a large images dataset (specific for recognizing human shapes) and a powerful hardware to train the neural network. $\endgroup$ – Ophion Dec 7 '17 at 18:49
  • $\begingroup$ in term of data sample problems, I was more meaning images/videos of actual break-in and trespassing attempts vs. lawful presence on the property (by the owners, neighbors, friends, etc., even the kids sneaking out at night;) Lawful presence would be easy, but break-ins are probably statistically rare, even in high-crime areas. So getting a sufficient sample size of break-in attempts sufficient to train a Deep Learning system would probably require a monumental, coordinated effort. $\endgroup$ – DukeZhou Dec 7 '17 at 19:52
  • $\begingroup$ By contrast, simply recognizing a human being, their status & intentions irrelevant, would probably be doable. So if you're just looking for a system that tells you there is a person in the yard, that's significantly less difficult. $\endgroup$ – DukeZhou Dec 7 '17 at 19:57
  • $\begingroup$ Sorry, I should have started with that. I was thinking about night, probably 3:00 am and with no kids playing around XD. The only presence of a human being in your backyard at 3:00 am it's at least an emergency. Changing the conditions then what do I need now? Of course, if the AI gets a picture (frame) and recognize a human shape the problem then is solved. I guess there is no need for learning about videos of breaking in cases. $\endgroup$ – Ophion Dec 7 '17 at 20:17
2
$\begingroup$

Here is some general info on how NNs work in relation to this specific problem. Hopefully it will provide some insight:

To identify target object, you can just train an NN to perform classification of images. Now, you will run into potential problems where this image can be located anywhere in given frame of input from the camera.

Let's say; you train a human NN that's able to act on 60px x 120px (so you will have 10800 input in your NN for the input layer). Under the assumption you can train the NN to identify whether or not the target object is showing in the image provided, you can use this trained NN to locate the object on the input frame.

Let's say the input frame from the camera is 640px x 480px. You will run into several potential problems 1) The object that's closer to the camera will be larger while the object that's further away from the camera will be smaller 2) The object may be located anywhere in the frame.

To overcome this problem with your already trained NN, I would start with a different mask size, for example, the first one I will probably have my first mask convolute all pixels with 240px x 480px. The first step is, scale it to 60px x 120px (which you can tell it is pretty much 4x) and capture the subset of pixels from pixels located in the area of (0,0) and (240, 480) and run it through the NN, If it yields true, then I will typically draw a box around the region to indicate the target object has been found.

Next, you shift over to 1-3 pixel and rerun it. For example, if we choose to move by 3px, then the region we are testing will be (3, 0) and (243, 480).

Once you finish this scale, you will want to choose a smaller mask, maybe something like 200px x 400px and do the same thing. When finished, go even smaller until you believe there's no point to search for an even smaller region because it is not going to be sufficient resolution for NN.

That's just my thought; maybe there's an even more efficient algorithm. Ultimately, I am sure there's a lot more can be optimized than what I've mentioned above!

$\endgroup$
  • $\begingroup$ Your approach looks good, but can you tell me an approximated hardware, not the required for training but the required for "run" the NN in real time. Could you also tell me if the process can be simplified using TensorFlow? $\endgroup$ – Ophion Dec 13 '17 at 19:31
  • $\begingroup$ It depends on your input layer. I believe forward-prop isn't too heavy to perform. What's really heavy is the back-prop. It will definitely help if you have a NVidia GPU which does matrix-multiplication fast. I say for "non-mission-critical", if you exam 2-3 frames per seconds, a regular CUDA support graphic card will be enough for forward-prop. $\endgroup$ – WorldWind Dec 14 '17 at 3:11
  • $\begingroup$ (continue) Just to put runtime in perspective (please correct me if I am wrong), depending on the number of layers you have, since the separation of concave regions may exist if it is greater than or equal to 3 layers, we can assume 3 layers for the sake of simplifying the calculation. $\endgroup$ – WorldWind Dec 14 '17 at 3:25
  • $\begingroup$ (continue) We can also assume that each neuron is a pretty simple function (i.e. sigmoid function), that can be considered as constant O(K) and given that for each step we have n neurons O(n), we can roughly estimate the running time is O(n^2 + K) for this forward prop to run. Therefore, based on the big O rules, we pretty much can assume it is O(n^2). $\endgroup$ – WorldWind Dec 14 '17 at 3:26
  • $\begingroup$ So, consider you do it in GPU that it runs matrix multiplication in parallel, it is going to be relatively fast! In theory, your CPU shouldn't even spike much because we don't use CPU to process calculation. $\endgroup$ – WorldWind Dec 14 '17 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.