atulyakumar97 / fire-and-gun-detection Goto Github PK
View Code? Open in Web Editor NEWFire and Gun detection using yolov3 in videos as well as images. Training code, dataset and trained weight file available.
License: MIT License
Fire and Gun detection using yolov3 in videos as well as images. Training code, dataset and trained weight file available.
License: MIT License
Please provide a download link. Thank you!
Hi:
I noticed in your sample videos, there is no jitters or lags at all. But when i run your default code, it has a lot of jitters/lags. A 5 seconds video may need 15 seconds to finish. Looks like the net.forward part is taking too long. How to modify the code in order to get the same effect as you showed in your video? Many thanks!
def detect_objects(img, net, outputLayers):
blob = cv2.dnn.blobFromImage(img, scalefactor=0.00392, size=(320, 320), mean=(0, 0, 0), swapRB=True, crop=False)
net.setInput(blob)
outputs = net.forward(outputLayers) #this part is taking so long
return blob, outputs
Great work you did there :)
I am getting an error while running this code, can you please help me.
Opening videos/fire1.mp4 ....
Traceback (most recent call last):
File "yolo.py", line 143, in
start_video(video_path)
File "yolo.py", line 116, in start_video
model, classes, colors, output_layers = load_yolo()
File "yolo.py", line 24, in load_yolo
output_layers = [layers_names[i[0]-1] for i in net.getUnconnectedOutLayers()]
File "yolo.py", line 24, in
output_layers = [layers_names[i[0]-1] for i in net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.
I would be really glad if you could help me in this.
Thank you :)
Your weight and config file can't support other type of code.only support your code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.