Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts and experience preferred (super rare at this point).
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
# USAGE | |
# python train_mask_detector.py --dataset dataset | |
# import the necessary packages | |
from tensorflow.keras.preprocessing.image import ImageDataGenerator | |
from tensorflow.keras.applications import MobileNetV2 | |
from tensorflow.keras.layers import AveragePooling2D | |
from tensorflow.keras.layers import Dropout | |
from tensorflow.keras.layers import Flatten | |
from tensorflow.keras.layers import Dense |
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
def get_facenet_masknet(): | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-f", "--face", type=str, | |
default="face_detector", | |
help="path to face detector model directory") | |
ap.add_argument("-m", "--model", type=str, | |
default="mask_detector.model", | |
help="path to trained face mask detector model") | |
ap.add_argument("-c", "--confidence", type=float, default=0.5, |
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
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input | |
from tensorflow.keras.preprocessing.image import img_to_array | |
from tensorflow.keras.models import load_model | |
from imutils.video import VideoStream | |
import numpy as np | |
import argparse | |
import imutils | |
import time | |
import cv2 | |
import os |
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 the necessary packages | |
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input | |
from tensorflow.keras.preprocessing.image import img_to_array | |
from tensorflow.keras.models import load_model | |
from imutils.video import VideoStream | |
import numpy as np | |
import argparse | |
import imutils | |
import time | |
import cv2 |
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
# Importing the Tello Drone Library | |
from djitellopy import Tello | |
# Importing OpenCV library | |
import cv2 | |
# Importing time package | |
import time | |
# Importing OS module | |
import os | |
# Instatiating the Tello module |
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
class Drone: | |
"""Wrapper class to setup the tello drone""" | |
def __init__(self, width, height): | |
self.StartCounter = 0 | |
self.width = width | |
self.height = height | |
self.back_velocity = 0 | |
self.left_right_velocity = 0 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder