This file contains hidden or 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 PIL | |
import os | |
import os.path | |
from PIL import Image | |
from PIL import ImageFile | |
ImageFile.LOAD_TRUNCATED_IMAGES = True | |
f = r'C:\Users\username\Desktop\example' | |
#folder path for rescaling |
This file contains hidden or 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
#put this file in the same folder as darknet_no_gpu.exe | |
import os | |
import sys | |
import shutil | |
from pykeyboard import PyKeyboard | |
k = PyKeyboard() | |
index = 1 | |
path = r"/Users/username/Desktop/example/" |
This file contains hidden or 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 PIL import Image | |
from os import listdir | |
from os.path import splitext | |
target_directory = '.' | |
target = '.jpg' | |
for file in listdir(target_directory): | |
filename, extension = splitext(file) | |
try: |
This file contains hidden or 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
#include "yolo-fastestv2.h" | |
#include <chrono> | |
using namespace std::chrono; | |
int drawBoxes(cv::Mat srcImg, std::vector<TargetBox> boxes) | |
{ | |
static const char* class_names[] = { | |
"person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light", | |
"fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", | |
"elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", |