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
apiVersion: autoscaling/v2beta1 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: podname | |
namespace: namespace | |
annotations: | |
metric-config.external.processed-events-per-second.prometheus/prometheus-server: http://prometheus.istio-system.svc | |
metric-config.object.istio-requests-total.prometheus/per-replica: "true" | |
metric-config.object.istio-requests-total.prometheus/query: | | |
sum( |
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 YoloHelper: | |
def preprocess(self, image): | |
image = img_to_array(image, ) | |
data = cv2.resize(image, (416, 416)) | |
# im_arr = img_to_array(data, ) | |
im_arr = data/255.0 | |
im_arr = np.expand_dims(im_arr, axis=0) | |
return im_arr |
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 sys | |
import numpy as np | |
import pickle | |
import os | |
# from darkflow.utils.box import BoundBox | |
from scipy.special import expit | |
from math import exp | |
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
model_config_list: { | |
config:{ | |
name: "yolov2", | |
base_path: "/home/gaurav/export", | |
model_platform: "tensorflow" | |
} | |
} | |
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 os | |
import tensorflow as tf | |
from tensorflow.python.saved_model import builder as saved_model_builder | |
from darkflow.net.build import TFNet | |
options = {"model": "yolov2-tiny.cfg", "load": "yolov2-tiny.weights", "threshold": 0.1} | |
tfnet = TFNet(options) | |
export_path = "./export/1/" |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: cluster-autoscaler | |
labels: | |
app: cluster-autoscaler | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
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 numpy as np | |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_alt.xml') | |
cap = cv2.VideoCapture(0) | |
scaling_factor = 0.5 | |
while True: | |
ret, frame = cap.read() | |
#frame = cv2.resize(frame, None, fx=scaling_factor, fy=scaling_factor,interpolation=cv2.INTER_AREA) | |
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) | |
face_rects = face_cascade.detectMultiScale(gray,1.3, 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 keras.preprocessing import image | |
from keras.applications.vgg19 import VGG19 | |
from keras.applications.vgg19 import preprocess_input | |
import numpy as np | |
from keras.layers import merge, Input | |
# from imagenet_utils import decode_predictions | |
model = VGG19(include_top=False,weights="imagenet") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 keras | |
import numpy as np | |
import os | |
import time | |
from vgg16 import VGG16 | |
from keras.preprocessing import image | |
from keras.applications.imagenet_utils import preprocess_input | |
from imagenet_utils import decode_predictions | |
from keras.layers import Dense, Activation, Flatten | |
from keras.layers import merge, Input |
NewerOlder