资源简介
Visual Studio 2015, CPU only, Python 3.5: Caffe Release
编译好的二进制文件。2018-10-19日版本
代码片段和文件信息
#!/usr/bin/env python
“““
classify.py is an out-of-the-box image classifer callable from the command line.
By default it configures and runs the Caffe reference ImageNet model.
“““
import numpy as np
import os
import sys
import argparse
import glob
import time
import caffe
def main(argv):
pycaffe_dir = os.path.dirname(__file__)
parser = argparse.ArgumentParser()
# Required arguments: input and output files.
parser.add_argument(
“input_file“
help=“Input image directory or npy.“
)
parser.add_argument(
“output_file“
help=“Output npy filename.“
)
# Optional arguments.
parser.add_argument(
“--model_def“
default=os.path.join(pycaffe_dir
“../models/bvlc_reference_caffenet/deploy.prototxt“)
help=“Model definition file.“
)
parser.add_argument(
“--pretrained_model“
default=os.path.join(pycaffe_dir
“../models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel“)
help=“Trained model weights file.“
)
parser.add_argument(
“--gpu“
action=‘store_true‘
help=“Switch for gpu computation.“
)
parser.add_argument(
“--center_only“
action=‘store_true‘
help=“Switch for prediction from center crop alone instead of “ +
“averaging predictions across crops (default).“
)
parser.add_argument(
“--images_dim“
default=‘256256‘
help=“Canonical ‘heightwidth‘ dimensions of input images.“
)
parser.add_argument(
“--mean_file“
default=os.path.join(pycaffe_dir
‘caffe/imagenet/ilsvrc_2012_mean.npy‘)
help=“Data set image mean of [Channels x Height x Width] dimensions “ +
“(numpy array). Set to ‘‘ for no mean subtraction.“
)
parser.add_argument(
“--input_scale“
type=float
help=“Multiply input features by this scale to finish preprocessing.“
)
parser.add_argument(
“--raw_scale“
type=float
default=255.0
help=“Multiply raw input by this scale before preprocessing.“
)
parser.add_argument(
“--channel_swap“
default=‘210‘
help=“Order to permute input channels. The default converts “ +
“RGB -> BGR since BGR is the Caffe default by way of OpenCV.“
)
parser.add_argument(
“--ext“
default=‘jpg‘
help=“Image file extension to take as input when a directory “ +
“is given as the input file.“
)
args = parser.parse_args()
image_dims = [int(s) for s in args.images_dim.split(‘‘)]
mean channel_swap = None None
if args.mean_file:
mean = np.load(args.mean_file)
if args.channel_swap:
channel_swap = [int(s) for s in args.channel_swap.split(‘‘)]
if args.gpu:
caffe.set_mode_gpu()
print(“GPU mode“)
else:
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 33280 2018-10-04 15:17 bin\boost_chrono-vc140-mt-1_61.dll
文件 138752 2018-10-04 15:17 bin\boost_filesystem-vc140-mt-1_61.dll
文件 282112 2018-10-04 15:17 bin\boost_python-vc140-mt-1_61.dll
文件 24576 2018-10-04 15:17 bin\boost_system-vc140-mt-1_61.dll
文件 115712 2018-10-04 15:17 bin\boost_thread-vc140-mt-1_61.dll
文件 3160576 2018-10-04 15:17 bin\caffe.exe
文件 2307072 2018-10-04 15:17 bin\caffehdf5.dll
文件 104448 2018-10-04 15:17 bin\caffehdf5_hl.dll
文件 82432 2018-10-04 15:17 bin\caffezlib1.dll
文件 3120128 2018-10-04 15:17 bin\classification.exe
文件 3103232 2018-10-04 15:17 bin\compute_image_mean.exe
文件 334656 2018-10-04 15:17 bin\CONCRT140.dll
文件 3101696 2018-10-04 15:17 bin\convert_cifar_data.exe
文件 3109376 2018-10-04 15:17 bin\convert_imageset.exe
文件 3102208 2018-10-04 15:17 bin\convert_mnist_data.exe
文件 3100672 2018-10-04 15:17 bin\convert_mnist_siamese_data.exe
文件 3095040 2018-10-04 15:17 bin\device_query.exe
文件 3121664 2018-10-04 15:17 bin\extract_features.exe
文件 3095040 2018-10-04 15:17 bin\finetune_net.exe
文件 139776 2018-10-04 15:17 bin\gflags.dll
文件 114176 2018-10-04 15:17 bin\glog.dll
文件 82432 2018-10-04 15:17 bin\libgcc_s_seh-1.dll
文件 1279488 2018-10-04 15:17 bin\libgfortran-3.dll
文件 38340126 2018-10-04 15:17 bin\libopenblas.dll
文件 331776 2018-10-04 15:17 bin\libquadmath-0.dll
文件 3095040 2018-10-04 15:17 bin\net_speed_benchmark.exe
文件 11057152 2018-10-04 15:17 bin\opencv_core310.dll
文件 2758144 2018-10-04 15:18 bin\opencv_imgcodecs310.dll
文件 25570304 2018-10-04 15:18 bin\opencv_imgproc310.dll
文件 3925504 2018-10-04 15:18 bin\python35.dll
文件 3095040 2018-10-04 15:18 bin\test_net.exe
............此处省略156个文件信息
相关资源
- windows鼠标自动点击py脚本
- python3.5.4_windows下32与64位安装包
- Windows64下通过python调用海康SDK实现登
- Windows7 Server Pack 1 KB2533625 安装包
- window环境下py3.5和vs2017编译的 caffe
- pycharm pymssql python3.6
- Ubuntu18.04LTS下安装 Caffe-GPU版本及 Ana
- faster rcnn(python+caffe)源代码
- matplotlib-1.4.3 windows python2.7 32位及64位
- python-3.7.3-amd64-webinstall.exe 安装包
- python + opencv 人脸识别代码(可以跨平
- windows下pyltp的whl安装包
- scapy+python2.7 windows 64位安装包
- pygame1.9.3-python3.7-windows-whl
- caffe模型转化为tensorflow模型
- Win10X64 下 VS2017 编译的X64位 Caffe 静态
- python3.4 3.5 3.6 twisted适配windows
- PyQt4 windows安装包
- Python 3.7.3
- labelImg_v1.5.1-windows.rar
- python-3.7.3-amd64.exe 安装包
- pypy windows 最新版 v5.8.0
- Python27 x64.zip
- caffe_imagenet_mean均值文件,代码文件
- pytorch 1.0 for python3.7 官方windows64位版本
- Visual Studio 2015 CUDA 8.0 Python 3.5: Caffe
- python3.7windows64版本
- numpy for python 2.7 (windows 64 bit)
- graphviz-2.38.msiwindows下python图形工具
- 简单实用的基于python的中文OCR字符识
评论
共有 条评论