Giter VIP home page Giter VIP logo

mask-detection's People

Contributors

rushad7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mask-detection's Issues

Sample commands are not working

Hello,

I got errors both running live video and image samples. What can be the problem?

python yolo-live-cv2.py --yolo yolo
[INFO] loading YOLO from disk
Traceback (most recent call last):
File "yolo-live-cv2.py", line 32, in
net = cv2.dnn.readNetFromDarknet(configPath, weightsPath)
cv2.error: OpenCV(4.2.0) /io/opencv/modules/dnn/src/darknet/darknet_io.cpp:712: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'ReadDarknetFromWeightsStream'

python custom_detector.py --image /home/fikret/project/yolov3_projects/face-mask-detector/dataset/with_mask/0-with-mask.jpg --config cfg/yolov3-custom.cfg --weights weights/yolov3-custom_final.weights --names class_names/custom.names
Traceback (most recent call last):
File "custom_detector.py", line 18, in
net = cv2.dnn.readNetFromDarknet(args.config, args.weights)
cv2.error: OpenCV(4.2.0) /io/opencv/modules/dnn/src/darknet/darknet_io.cpp:712: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'ReadDarknetFromWeightsStream'

dataset

how many images did you use to train the model.
i used approx 500 images for 1 class but still the output is not correct.
Like it is not showing bounding boxes for all the images and in some cases wrong,
what could be the possible error?

test_train_split.py is doesn't work

I'm try using the test_train_split.py to create the train data and test data.
But, it doesn't work.
So, i'm trying to modify.It's still doesn't work...
It can't go into the for loop.
As like this:

''' Usage :
    python test_train_split.py -d ~/mask-detection/annotations/
'''
import glob, os
import argparse

ap = argparse.ArgumentParser()
ap.add_argument("-d", "--dir", required=True, help="Directory of dataset")
args = vars(ap.parse_args())

img_dir = str(args["dir"])
print(args["dir"])
percentage_test = 10;

#file_train = open(r'../train_test/train.txt', 'a')
#file_test = open(r'../train_test/test.txt', 'a')

counter = 1
index_test = round(100 / percentage_test)
for pathAndFilename in glob.iglob(os.path.join(img_dir, "*.jpg")):
    title, ext = os.path.splitext(os.path.basename(pathAndFilename))
    print("for")

    if int(counter) == int(index_test):
	print("test")
        counter = 1
        file_test = open(r'~/train_test/train.txt', 'a')
        file_test.write(img_dir + "/" + title + '.jpg' + "\n")
        file_test.close()
    else:
	print("train")
        file_train = open(r'~/train_test/test.txt', 'a')
        file_train.write(img_dir + "/" + title + '.jpg' + "\n")
        file_train.close()
        counter = counter + 1

Please help me, thank you!

config file does not even reflect the problem!!

I opened your config file and it does not show 2 classes. it shows 80 classes. And you say directly use this to test however, your config file is in the training mode. Plus, the custom weights file is not even a weights file.

Weights file is not really weights! how can I use it or download it?

While trying to run the following:

python3 custom_detector.py --image "/home/nvr/rushad7/mask-detection/images/example_01.png" --config "/home/nvr/rushad7/mask-detection/cfg/yolov3-custom.cfg" --weights "/home/nvr/rushad7/mask-detection/weights/yolov3-custom_final.weights" --names "/home/nvr/rushad7/mask-detection/class_names/voc.names"

I get the following error:

Traceback (most recent call last):
  File "custom_detector.py", line 18, in <module>
    net = cv2.dnn.readNetFromDarknet(args.config, args.weights)
cv2.error: OpenCV(4.3.0-openvino) ../opencv/modules/dnn/src/darknet/darknet_io.cpp:847: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'ReadDarknetFromWeightsStream'

I opened the weights file and it seems to have a git lfs download link and oid...
How do I download the real weights file?

UPDATE:

git lfs fetch
fetch: Fetching reference refs/heads/master
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.                                                            
error: failed to fetch some objects from 'https://github.com/rushad7/mask-detection.git/info/lfs'

@rushad7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.