This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.tree import DecisionTreeClassifier | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import accuracy_score | |
import matplotlib.pyplot as plt | |
data = pd.read_csv('music.csv') #THIS WORKS FOR SMALL DATA | |
X = data.drop(columns=['genre']) | |
y = data['genre'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 as cv | |
cap = cv.VideoCapture(0) | |
while True: | |
successs, img = cap.read() | |
gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY) | |
haar_cascade = cv.CascadeClassifier("haar_face.xml") | |
face_detect = haar_cascade.detectMultiScale(gray,1.1,12) | |
for (x,y,w,h) in face_detect: | |
cv.rectangle(img,(x,y),(x+w,y+h),(0,256,0),2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import speech_recognition as sr | |
import webbrowser | |
recog = sr.Recognizer() | |
with sr.Microphone() as source: | |
print('WHAT DO YOU WANT TO SEARCH: ') | |
audio = recog.listen(source) | |
try: | |
text = recog.recognize_google(audio) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import mediapipe as mp | |
import time | |
cap = cv2.VideoCapture(0) | |
mphands = mp.solutions.hands | |
hands = mphands.Hands() | |
mpdraw = mp.solutions.drawing_utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import mediapipe as mp | |
cap = cv2.VideoCapture(0) | |
mpDraw = mp.solutions.drawing_utils | |
mpPose = mp.solutions.pose | |
pose = mpPose.Pose() | |
while True: | |
success, img = cap.read() | |
imgRgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import mediapipe as mp | |
import time | |
cap = cv2.VideoCapture(0) | |
pTime = 0 | |
mpFacedtect = mp.solutions.face_detection | |
mpDraw = mp.solutions.drawing_utils | |
facetect = mpFacedtect.FaceDetection() | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import mediapipe as mp | |
import numpy as np | |
import math | |
from ctypes import cast, POINTER | |
from comtypes import CLSCTX_ALL | |
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume | |
cap = cv2.VideoCapture(0) |