Git Product home page Git Product logo

maskrcnn_benchmark.cpp's People

Contributors

lsrock1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

maskrcnn_benchmark.cpp's Issues

keypoints

Hi, do you plan to add keypoints structures/heads?
Regards,

still new

Hi i'm still new in deep learning, may I know where can i train my own data ?
and i still cant find which file indicate the epoch and activation function to define the model

Thank you

please show me the version of gcc and cuda

my gcc is 4.9 and cuda is 9.0

[ 3%] Building CXX object source/rcnn/layers/CMakeFiles/layers.dir/batch_norm.cpp.o
[ 6%] Building CXX object source/rcnn/layers/CMakeFiles/layers.dir/conv2d.cpp.o
[ 10%] Building CXX object source/rcnn/layers/CMakeFiles/layers.dir/cpu/ROIAlign_cpu.cpp.o
[ 13%] Building CXX object source/rcnn/layers/CMakeFiles/layers.dir/cpu/nms_cpu.cpp.o
[ 16%] Building CUDA object source/rcnn/layers/CMakeFiles/layers.dir/cuda/ROIAlign_cuda.cu.o
In file included from /usr/include/c++/4.9/atomic:38:0,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/c10/core/TensorTypeIdRegistration.h:15,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/c10/core/Backend.h:5,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/c10/core/Layout.h:3,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/ATen/core/Type.h:7,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/ATen/Type.h:2,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/ATen/Context.h:4,
from /home/f1684326/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/f1684326/github/maskrcnn_benchmark_cpp/maskrcnn_benchmark.cpp/source/rcnn/layers/cuda/ROIAlign_cuda.cu:2:
/usr/include/c++/4.9/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
source/rcnn/layers/CMakeFiles/layers.dir/build.make:114: recipe for target 'source/rcnn/layers/CMakeFiles/layers.dir/cuda/ROIAlign_cuda.cu.o' failed
make[2]: *** [source/rcnn/layers/CMakeFiles/layers.dir/cuda/ROIAlign_cuda.cu.o] Error 1
CMakeFiles/Makefile2:212: recipe for target 'source/rcnn/layers/CMakeFiles/layers.dir/all' failed
make[1]: *** [source/rcnn/layers/CMakeFiles/layers.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Failed to convert the model of python to C++

I tried to use the same e2e_faster_rcnn_101_fpn_1x.yaml configuration to convert the model to a C ++ callable torchscript. However, when traversing module.get_attributes () in jit_to_cpp.cpp, a boolean error cannot be assigned to the tensor. I checked the model in python, and indeed there is a Boolean variable (eg. Training). Have you encountered this problem during conversion?

OpenCV

Hi, are there any benefits from source compilation instead of using binaries? It takes hell lot of time :)
Regards,

compile error of "fmap" in parallel.cpp

dear @lsrock1 ,
I'm trying to compile your repo with gcc 7.4 libtorch 1.3.1
it seemed to be going well first but showed an error related to "fmap" as below

[ 79%] Building CXX object source/rcnn/engine/CMakeFiles/engine.dir/inference.cpp.o
[ 80%] Building CXX object source/rcnn/engine/CMakeFiles/engine.dir/parallel.cpp.o
/home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp: In function ‘std::pair<at::Tensor, std::map<std::__cxx11::basic_string, at::Tensor> > rcnn::engine::data_parallel(rcnn::modeling::GeneralizedRCNN, rcnn::structures::ImageList, std::vectorrcnn::structures::BoxList, c10::optional<std::vectorc10::Device >, c10::optionalc10::Device, int64_t)’:
/home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp:118:28: error: ‘fmap’ was not declared in this scope
auto scattered_tensors = fmaptorch::Tensor(scatter.apply({std::move(input)}));
^~~~
/home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp:118:28: note: suggested alternatives:
In file included from /home/lee/Downloads/libtorch/include/ATen/core/ivalue_inl.h:6:0,
from /home/lee/Downloads/libtorch/include/ATen/core/ivalue.h:636,
from /home/lee/Downloads/libtorch/include/ATen/core/stack.h:3,
from /home/lee/Downloads/libtorch/include/ATen/core/ATenDispatch.h:15,
from /home/lee/Downloads/libtorch/include/ATen/core/TensorMethods.h:10,
from /home/lee/Downloads/libtorch/include/ATen/Tensor.h:12,
from /home/lee/Downloads/libtorch/include/ATen/Context.h:4,
from /home/lee/Downloads/libtorch/include/ATen/ATen.h:5,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/types.h:3,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/data.h:3,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/all.h:4,
from /home/lee/Downloads/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
from /home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/../../../include/rcnn/engine/parallel.h:2,
from /home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp:1:
/home/lee/Downloads/libtorch/include/ATen/core/functional.h:29:23: note: ‘c10::fmap’
inline std::vector fmap(const T& inputs) {
^~~~
/home/lee/Downloads/libtorch/include/ATen/core/functional.h:18:13: note: ‘c10::fmap’
inline auto fmap(const T& inputs, const F& fn) -> std::vector<decltype(fn(*inputs.begin()))> {
^~~~
/home/lee/Downloads/libtorch/include/ATen/core/functional.h:29:23: note: ‘c10::fmap’
inline std::vector fmap(const T& inputs) {
^~~~
/home/lee/Downloads/libtorch/include/ATen/core/functional.h:29:23: note: ‘c10::fmap’
/home/lee/Downloads/libtorch/include/ATen/core/functional.h:29:23: note: ‘c10::fmap’
/home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp:118:46: error: expected primary-expression before ‘>’ token
auto scattered_tensors = fmaptorch::Tensor(scatter.apply({std::move(input)}));
^
/home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp:121:22: error: unable to deduce ‘auto&&’ from ‘scattered_tensors’
for(auto& tensor : scattered_tensors){
^~~~~~~~~~~~~~~~~
/home/lee/maskrcnn_benchmark.cpp/source/rcnn/engine/parallel.cpp:156:44: error: expected primary-expression before ‘>’ token
.apply(fmaptorch::autograd::Variable(std::move(total_loss)))
^

Im struggling to find the reason.

I hope you can give me some hints

Thank you!

i use libtorch 1.1.0 cuda_10,make error

[ 26%] Building CXX object source/rcnn/solver/CMakeFiles/solver.dir/solver_build.cpp.o
In file included from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/layers/../../../include/rcnn/layers/roi_align.h:4:0,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/modeling/../../../include/rcnn/modeling/poolers.h:4,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/modeling/../../../include/rcnn/modeling/roi_heads/box_head/roi_box_feature_extractors.h:6,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/modeling/../../../include/rcnn/modeling/roi_heads/box_head/box_head.h:6,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/modeling/../../../include/rcnn/modeling/roi_heads/roi_heads.h:5,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/modeling/../../../include/rcnn/modeling/detector/generalized_rcnn.h:12,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/solver/../../../include/rcnn/solver/solver_build.h:4,
from /home/chenxin/Desktop/maskrcnn_benchmark.cpp/source/rcnn/solver/solver_build.cpp:1:
/home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/include/torch/csrc/autograd/VariableTypeUtils.h: In function ‘void torch::autograd::check_inplace(const at::Tensor&)’:
/home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/include/torch/csrc/autograd/VariableTypeUtils.h:45:13: error: redefinition of ‘void torch::autograd::check_inplace(const at::Tensor&)’
inline void check_inplace(const Tensor& tensor) {
^~~~~~~~~~~~~

Error in compiling (windows10 vs2015)

In the last step, after finishing cmake, I compiling the project in vs2015 and meet more than 400 errors, how can I solve them?
For example:
错误 C2131 表达式的计算结果不是常数
maskrcnn_benchmark.cpp\source\coco\mask.cpp 123
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C3863 不可指定数组类型“double ['函数']” maskrcnn_benchmark.cpp\source\coco\mask.cpp 125
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 member "torch::jit::ArgumentSpecCreator::DEPTH_LIMIT" may not be initialized layers maskrcnn_benchmark.cpp\lib\libtorch\include\torch\csrc\jit\argument_spec.h 161

anchors

hi,how can i generate anchors with libtorch on gpu device.

make error with libtorch 1.1.0 cuda_10,(Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0

In file included from /home2/maskrcnn_benchmark.cpp/source/rcnn/layers/conv2d.cpp:2:0:
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/../../../include/rcnn/layers/conv2d.h:12:68: error: expected class-name before ‘{’ token
struct _NewEmptyTensorOpBackward : public torch::autograd::Function{
^
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/../../../include/rcnn/layers/conv2d.h:14:34: error: ‘torch::autograd::variable_list rcnn::layers::_NewEmptyTensorOpBackward::apply(torch::autograd::variable_list&&)’ marked ‘override’, but does not override
torch::autograd::variable_list apply(torch::autograd::variable_list&& grads) override;
^~~~~
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/conv2d.cpp: In member function ‘torch::autograd::variable_list rcnn::layers::_NewEmptyTensorOpBackward::apply(torch::autograd::variable_list&&)’:
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/conv2d.cpp:16:9: error: ‘should_compute_output’ was not declared in this scope
if (should_compute_output(0)) {
^~~~~~~~~~~~~~~~~~~~~
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/conv2d.cpp: In function ‘at::Tensor rcnn::layers::_NewEmptyTensorOp(at::Tensor, c10::IntArrayRef)’:
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/conv2d.cpp:55:113: error: ‘deleteFunction’ is not a member of ‘torch::autograd’
auto grad_fn = std::shared_ptr<_NewEmptyTensorOpBackward>(new _NewEmptyTensorOpBackward(), torch::autograd::deleteFunction);
^~~~~~~~~~~~~~
/home2/maskrcnn_benchmark.cpp/source/rcnn/layers/conv2d.cpp:55:113: note: suggested alternative: ‘TraceableFunction’
auto grad_fn = std::shared_ptr<_NewEmptyTensorOpBackward>(new _NewEmptyTensorOpBackward(), torch::autograd::deleteFunction);
^~~~~~~~~~~~~~
TraceableFunction
source/rcnn/layers/CMakeFiles/layers.dir/build.make:75: recipe for target 'source/rcnn/layers/CMakeFiles/layers.dir/conv2d.cpp.o' failed
make[2]: *** [source/rcnn/layers/CMakeFiles/layers.dir/conv2d.cpp.o] Error 1
CMakeFiles/Makefile2:342: recipe for target 'source/rcnn/layers/CMakeFiles/layers.dir/all' failed
make[1]: *** [source/rcnn/layers/CMakeFiles/layers.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

error: expected template-name before ‘<’ token class _NewEmptyTensorOp : public torch::autograd::Function<_NewEmptyTensorOp>

[ 1%] Building CXX object source/rcnn/layers/CMakeFiles/layers.dir/batch_norm.cpp.o
[ 2%] Building CXX object source/rcnn/layers/CMakeFiles/layers.dir/conv2d.cpp.o
In file included from /home/b324-no2/lg/maskrcnn_benchmark.cpp-master/source/rcnn/layers/conv2d.cpp:1:0:
/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/source/rcnn/layers/../../../include/rcnn/layers/conv2d.h:9:59: error: expected template-name before ‘<’ token
class _NewEmptyTensorOp : public torch::autograd::Function<_NewEmptyTensorOp> {
^
/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/source/rcnn/layers/../../../include/rcnn/layers/conv2d.h:9:59: error: expected ‘{’ before ‘<’ token
/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/source/rcnn/layers/../../../include/rcnn/layers/conv2d.h:9:59: error: expected unqualified-id before ‘<’ token
/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/source/rcnn/layers/conv2d.cpp:42:1: error: expected ‘}’ at end of input
} // namespace rcnn
^
/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/source/rcnn/layers/conv2d.cpp:42:1: error: expected ‘}’ at end of input
make[2]: *** [source/rcnn/layers/CMakeFiles/layers.dir/build.make:76: source/rcnn/layers/CMakeFiles/layers.dir/conv2d.cpp.o] Error 1
make[2]: Leaving directory '/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/build'
make[1]: *** [CMakeFiles/Makefile2:343: source/rcnn/layers/CMakeFiles/layers.dir/all] Error 2
make[1]: Leaving directory '/home/b324-no2/lg/maskrcnn_benchmark.cpp-master/build'
make: *** [Makefile:130: all] Error 2

please help me ,tks!!!!

parallel inference

Hi, I noticed you reimplemented torch::nn::parallel::parallel_apply(). Is it supposed to be for multi-threaded evaluation? In general I wonder what would be the benefit od multi-threaded inference in C++ in comparision to Python?
Regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.