This lock provide one reliable anti-frard solution to Smart door lock with vision-authentication agianst illegal access to door.
Combined Deep Learnig Model of Classification and auxiliary bio-detective solution.
2 How does the solution workThe solution works with embeded deep learning model on NVIDIA Jetson Nano with two task running together.
NVIDIA Jetson Nano shall be running with compact Tensorflow model, the pre-trained model shall be used and trained with customized input image.
USB camera can catch human with Classification Model, then use infra-biosensor to verify the human presense.
3 DemoHere is the picture for the build of lock to be used and how the jetson nano runs.
The usb camera take pictures and drive the SG-9G servo for lock opening.
The library use rpi.python to drive the servo directly.
Then make the vrl2-ctl available by running,
sudo apt-get install v4l-utils
v4l2-ctl --list-formats-ext
Then makes python project based on demo code,
type command with,
./imagenet-camera.py --camera=/dev/video0
import jetson.inference
import jetson.utils
import argparse
import sys
# parse the command line
parser = argparse.ArgumentParser(description="Classify a live camera stream using an image recognition DNN.",
formatter_class=argparse.RawTextHelpFormatter, epilog=jetson.inference.imageNet.Usage())
parser.add_argument("--network", type=str, default="googlenet", help="pre-trained model to load (see below for options)")
parser.add_argument("--camera", type=str, default="0", help="index of the MIPI CSI camera to use (e.g. CSI camera 0)\nor for VL42 cameras, the /dev/video device to use.\nby default, MIPI CSI camera 0 will be used.")
parser.add_argument("--width", type=int, default=1280, help="desired width of camera stream (default is 1280 pixels)")
parser.add_argument("--height", type=int, default=720, help="desired height of camera stream (default is 720 pixels)")
try:
opt = parser.parse_known_args()[0]
except:
print("")
parser.print_help()
sys.exit(0)
# load the recognition network
net = jetson.inference.imageNet(opt.network, sys.argv)
# create the camera and display
font = jetson.utils.cudaFont()
camera = jetson.utils.gstCamera(opt.width, opt.height, opt.camera)
display = jetson.utils.glDisplay()
# process frames until user exits
while display.IsOpen():
# capture the image
img, width, height = camera.CaptureRGBA()
# classify the image
class_idx, confidence = net.Classify(img, width, height)
# find the object description
class_desc = net.GetClassDesc(class_idx)
# overlay the result on the image
font.OverlayText(img, width, height, "{:05.2f}% {:s}".format(confidence * 100, class_desc), 5, 5, font.White, font.Gray40)
# render the image
display.RenderOnce(img, width, height)
# update the title bar
display.SetTitle("{:s} | Network {:.0f} FPS".format(net.GetNetworkName(), net.GetNetworkFPS()))
# print out performance info
net.PrintProfilerTimes()
4 Next step, there are some delay on schedule, more work shall be done to make the model running and working. Update the entry with ongoing progress later.
Comments