Skip to content

Instantly share code, notes, and snippets.

View MrPanch's full-sized avatar
🎯
Focusing

MrPanch

🎯
Focusing
View GitHub Profile
#include <iostream>
#include <queue>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <unistd.h>
//-----------------------------------------------------------
#if 0
@MrPanch
MrPanch / readme.md
Created November 18, 2019 14:35 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

import cv2
import numpy as np
cap = cv2.VideoCapture('target2.mp4')
template = cv2.imread("target.jpg", cv2.IMREAD_GRAYSCALE)
#template = cv2.resize(template, (600, 600))
template = cv2.Canny(template, 50, 200)
w, h = template.shape[::-1]
while True:
_, frame = cap.read()
frame = cv2.resize(frame, (1000, 800))
import numpy as np
import cv2 as cv
import matplotlib.pyplot as plt
img1 = cv.imread('cup.jpg',cv.IMREAD_GRAYSCALE) # queryImage
img2 = cv.imread('cup_reverse.jpg',cv.IMREAD_GRAYSCALE) # trainImage
# Initiate SIFT detector SIFT - это алгоритм, который ищет точки на картинке, которые выделяются на фоне остальных и по ним можно
#ориентироваться
sift = cv.xfeatures2d.SIFT_create()
# find the keypoints and descriptors with SIFT
kp1, des1 = sift.detectAndCompute(img1,None)
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
plt.rcParams["animation.html"] = "jshtml"
tmp = np.linspace(0, 300, 50)
x = np.linspace(-1, 1, 30)
y = np.linspace(-1, 1, 30)
X, Y = np.meshgrid(x,y)
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
plt.rcParams["animation.html"] = "jshtml"
tmp = np.linspace(0, 300, 50)
x = np.linspace(-1, 1, 30)
y = np.linspace(-1, 1, 30)
X, Y = np.meshgrid(x,y)
#8 задачка
def is_increasing(L, strict=True):
answer = True
i = 0
if (strict == True):
while answer == True and i < len(L)-1:
if (L[i] >= L[i+1]):
answer = False
i+=1
else:
#include <iostream>
using namespace std;
class Deque
{
private:
public:
Deque()
{
#include <iostream>
#include <vector>
using namespace std;
class PQ
{
private:
public:
vector<int> array;
int size;
#include <iostream>
using namespace std;
class PQ
{
private:
public:
int* array;
int size;