diff --git a/README.md b/README.md deleted file mode 100644 index ea0f99a..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Face-detection-using-MTCNN -face detection using mtcnn complete implementation step by step diff --git a/hello.txt b/hello.txt deleted file mode 100644 index 95d09f2..0000000 --- a/hello.txt +++ /dev/null @@ -1 +0,0 @@ -hello world \ No newline at end of file diff --git a/input & output images/Outputfile.jpg b/input & output/Outputfile.jpg similarity index 100% rename from input & output images/Outputfile.jpg rename to input & output/Outputfile.jpg diff --git a/input & output images/file.mp4 b/input & output/file.mp4 similarity index 100% rename from input & output images/file.mp4 rename to input & output/file.mp4 diff --git a/input & output images/file2.mp4 b/input & output/file2.mp4 similarity index 100% rename from input & output images/file2.mp4 rename to input & output/file2.mp4 diff --git a/input & output images/filename.avi b/input & output/filename.avi similarity index 100% rename from input & output images/filename.avi rename to input & output/filename.avi diff --git a/input & output images/people.jpg b/input & output/people.jpg similarity index 100% rename from input & output images/people.jpg rename to input & output/people.jpg diff --git a/mtcnn_image.py b/mtcnn_image.py index be7e2cc..5b77de9 100644 --- a/mtcnn_image.py +++ b/mtcnn_image.py @@ -2,7 +2,7 @@ from mtcnn.mtcnn import MTCNN detector = MTCNN() -img=cv2.imread("input & output images/people.jpg") +img=cv2.imread("input & output/people.jpg") location = detector.detect_faces(img) if len(location) > 0: for face in location: @@ -10,5 +10,5 @@ x2, y2 = x + width, y + height cv2.rectangle(img, (x, y), (x2, y2), (0, 0, 255), 4) -cv2.imwrite("input & output images/Outputfile.jpg",img) -print("The Image was successfully saved") \ No newline at end of file +cv2.imwrite("input & output/Outputfile.jpg",img) +print("The Image was successfully saved") diff --git a/mtcnn_live_cam.py b/mtcnn_live_cam.py index 6aaddda..1756426 100644 --- a/mtcnn_live_cam.py +++ b/mtcnn_live_cam.py @@ -2,7 +2,7 @@ from mtcnn.mtcnn import MTCNN detector = MTCNN() -video = cv2.VideoCapture(0) +video = cv2.VideoCapture(0) #Read from computer or external camera if (video.isOpened() == False): print("Web Camera not detected") @@ -22,4 +22,4 @@ break video.release() -cv2.destroyAllWindows() \ No newline at end of file +cv2.destroyAllWindows() diff --git a/mtcnn_video.py b/mtcnn_video.py index 4572c47..9f1b39a 100644 --- a/mtcnn_video.py +++ b/mtcnn_video.py @@ -1,13 +1,10 @@ import cv2 from mtcnn.mtcnn import MTCNN detector = MTCNN() +video = cv2.VideoCapture("input & output/file2.mp4") -video = cv2.VideoCapture("input & output images/file2.mp4") - -# We need to check if camera -# is opened previously or not if (video.isOpened() == False): - print("Error reading video file") + print("Video Not Founds") # We need to set resolutions. # so, convert them from float to integer. @@ -16,10 +13,7 @@ size = (frame_width, frame_height) -# Below VideoWriter object will create -# a frame of above defined The output -# is stored in 'filename.avi' file. -result = cv2.VideoWriter('filename.avi',cv2.VideoWriter_fourcc(*'MJPG'),29, size) +result = cv2.VideoWriter('input & output/filename.avi',cv2.VideoWriter_fourcc(*'MJPG'),29, size) frame_num=0 while (True): ret, frame = video.read() @@ -33,11 +27,9 @@ x, y, width, height = face['box'] x2, y2 = x + width, y + height cv2.rectangle(frame, (x, y), (x2, y2), (0, 0, 255), 4) - result.write(frame) + result.write(frame) #Write an image if cv2.waitKey(1) & 0xFF == ord('q'): break - - # Break the loop else: break diff --git a/~$README.md b/~$README.md deleted file mode 100644 index 6ac0f6f..0000000 Binary files a/~$README.md and /dev/null differ