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
# codinf=utf-8 | |
import sys | |
sys.path.append('./utils/') | |
from matplotlib import pyplot as plt | |
import numpy as np | |
from PIL import Image | |
import tensorflow as tf | |
import get_dataset_colormap | |
import os | |
import matplotlib |
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 argparse | |
import numpy as np | |
from tf_text_graph_common import * | |
parser = argparse.ArgumentParser(description='Run this script to get a text graph of ' | |
'Mask-RCNN model from TensorFlow Object Detection API. ' | |
'Then pass it with .pb file to cv::dnn::readNetFromTensorflow function.') | |
parser.add_argument('--input', required=True, help='Path to frozen TensorFlow graph.') | |
parser.add_argument('--output', required=True, help='Path to output text graph.') | |
parser.add_argument('--config', required=True, help='Path to a *.config file is used for training.') |
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 | |
import argparse | |
import numpy as np | |
import os.path | |
import sys | |
import random | |
# Initialize the parameters | |
confThreshold = 0.3 # Confidence threshold | |
maskThreshold = 0.5 # Mask threshold |
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
#coding=utf-8 | |
import numpy as np | |
import cv2 | |
import matplotlib.pyplot as plt | |
import os | |
import PIL | |
from PIL import Image | |
caffe_root = '/home/mahxn0/caffe/' | |
work_dir='/home/mahxn0/workspace/src/detectAndRecog/src/caffenet/model-googlenet-watch/' |