Something on RoIAlign --- basic introduction and implementation

Something on RoIAlign --- basic introduction and implementation

2018-10-22 22:40:09

Paper: Mask RCNN

Code reference: https://github.com/longcw/RoIAlign.pytorch

=====

git clone https://github.com/longcw/RoIAlign.pytorch

cd RoIAlign.pytorch

modify the script install.sh and test.sh into the following way:

#!/usr/bin/env bash

CUDA_PATH=/usr/local/cuda

echo "Compiling crop_and_resize kernels by nvcc..."
cd roi_align/src/cuda
$CUDA_PATH/bin/nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_30  -gencode=arch=compute_30,code=sm_30  -gencode=arch=compute_50,code=sm_50  -gencode=arch=compute_52,code=sm_52  -gencode=arch=compute_60,code=sm_60  -gencode=arch=compute_61,code=sm_61  -gencode=arch=compute_62,code=sm_62
cd ../../../roi_align
python3 build.py

cd ..
python3 setup.py install
#find  $CONDA_PREFIX -name roi_align | awk ‘{mkdir $0 "/_ext" }‘ |bash
#find  $CONDA_PREFIX -name roi_align | awk ‘{print "cp -r roi_align/_ext/* " $0 "/_ext/" }‘ |bash

python3 tests/test.py
python3 tests/test2.py
python3 tests/crop_and_resize_example.py

then, run the test.sh, you can found this:

[email protected]:/media/wangxiao/b8efbc67-7ea5-476d-9631-70da75f84e2d/reference_code/RoIAlign.pytorch$ sh ./test.sh
/usr/local/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module ‘tensorflow.python.framework.fast_tensor_util‘ does not match runtime version 3.6
return f(*args, **kwds)
pytorch forward and backward start
pytorch forward and backward end
2018-10-22 22:38:28.483699: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2018-10-22 22:38:28.492705: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-10-22 22:38:28.493019: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties:
name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.898
pciBusID: 0000:02:00.0
totalMemory: 7.92GiB freeMemory: 6.29GiB
2018-10-22 22:38:28.493047: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:02:00.0, compute capability: 6.1)
2018-10-22 22:38:28.737003: E tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 7102 (compatibility version 7100) but source was compiled with 6021 (compatibility version 6000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2018-10-22 22:38:28.737107: F tensorflow/core/kernels/conv_ops.cc:667] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo<T>(), &algorithms)
Aborted
tensor([[[[0., 1., 2.],
[0., 1., 2.],
[0., 1., 2.]]]], grad_fn=<CropAndResizeFunction>)
torch.Size([2, 3, 500, 500])

==

原文地址:https://www.cnblogs.com/wangxiaocvpr/p/9833665.html

时间: 2024-11-11 03:56:54

Something on RoIAlign --- basic introduction and implementation的相关文章

The basic introduction to MIX language and machine

reference: The MIX Computer, The MIX Introduction sets, The basic info storage unit in MIX computer is the byte, which stores positive values in the range of 0 to 63. In MIX, Byte only has 6 bytes, and the word Byte refer to MIX 6-byte. A MIX word is

Basic Task List

参考: https://laravel.com/docs/5.2/quickstart#stubbing-the-routes Introduction This quickstart guide provides a basic introduction to the Laravel framework and includes content on database migrations, the Eloquent ORM, routing, validation, views, and B

机器学习公开课笔记(4):神经网络(Neural Network)——表示

动机(Motivation) 对于非线性分类问题,如果用多元线性回归进行分类,需要构造许多高次项,导致特征特多学习参数过多,从而复杂度太高. 神经网络(Neural Network) 一个简单的神经网络如下图所示,每一个圆圈表示一个神经元,每个神经元接收上一层神经元的输出作为其输入,同时其输出信号到下一层,其中每一层的第一个神经元称为bias unit,它是额外加入的其值为1,通常用+1表示,下图用虚线画出. 符号说明: $a_i^{(j)}$表示第j层网络的第i个神经元,例如下图$a_1^{(

6.在MVC中使用泛型仓储模式和依赖注入实现增删查改

原文链接:http://www.c-sharpcorner.com/UploadFile/3d39b4/crud-operations-using-the-generic-repository-pattern-and-dep/ 系列目录: Relationship in Entity Framework Using Code First Approach With Fluent API[[使用EF Code-First方式和Fluent API来探讨EF中的关系]] Code First Mig

A real sense 3D face reconstruction system based on multi-view stereo vision

Abstract This paper proposed a system for a real sense 3D facial reconstruction method based on multi-view stereo vision generated using an orthographic 3D model. Multi-view stereopsis is an effective technology for expanding perspective and reducing

TensorFlow tutorial

代码示例来自https://github.com/aymericdamien/TensorFlow-Examples tensorflow先定义运算图,在run的时候才会进行真正的运算. run之前需要先建立一个session 常量用constant 如a = tf.constant(2) 变量用placeholder 需要指定类型 如a = tf.placeholder(tf.int16) 矩阵相乘 matrix1 = tf.constant([[3., 3.]]) #1*2矩阵 matrix

Gemcom Surpac 6.12 大型矿山工程软件 稳定版

1.Gemcom Whittle.v4.5 1CD矿山软件Gemcom Whittle.v4.5 1CD Gemcom Whittle v4.4.1 1CD矿山软件 依托Whittle能够帮助他们确定投资方案提交稳健的开采计划,并且充分考虑矿山开采的实际条件,提出多种参考方案,在考虑实际的开采限制的基础上使收益最大化. Whittle提交... 2.Gemcom MineSched v8.0 1CD矿山长短期进度计划编制软件Gemcom MineSched v8.0 1CD The MineSc

程序编程实训库源代码

/* * File: stdgen.h * ----------------------------------------------------- * The basic definitions provided by stdgen.h are: * * 1. Declarations for several new "primitive" types * (most importantly string) that are * used throughout the other

vertical roller Mill design principles and wearing parts repair

Basic Introduction Short vertical mill vertical roller mill , a cement raw materials, cement clinker, slag and cinder grinding process used, has a simple structure, low cost of manufacture and use characteristics. Between the body including, disc dri