GithubHelp home page GithubHelp logo

renmengye / rec-attend-public Goto Github PK

View Code? Open in Web Editor NEW
108.0 108.0 46.0 187 KB

Code that implements paper "End-to-End Instance Segmentation with Recurrent Attention"

License: MIT License

Python 94.44% C++ 3.06% Shell 2.36% C 0.14%

rec-attend-public's People

Contributors

renmengye 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  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  avatar  avatar

rec-attend-public's Issues

error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14

Running ./hungarian_build.sh throws following error:

from hungarian.cc:15:
/home/lmancuso/leaf/brunotf/lib/python3.7/site-packages/tensorflow/include/tensorflow/core/framework/tensor_types.h: In member function ‘void tensorflow::internal::MaybeWith32BitIndexingImpl<Eigen::GpuDevice>::operator()(Func, Args&& ...) const’:
/home/lmancuso/leaf/brunotf/lib/python3.7/site-packages/tensorflow/include/tensorflow/core/framework/tensor_types.h:176:25: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
     auto all = [](const auto&... bool_vals) {
                         ^~~~
/home/lmancuso/leaf/brunotf/lib/python3.7/site-packages/tensorflow/include/tensorflow/core/framework/tensor_types.h:176:34: error: expansion pattern ‘const int&’ contains no argument packs
     auto all = [](const auto&... bool_vals) {
                                  ^~~~~~~~~
/home/lmancuso/leaf/brunotf/lib/python3.7/site-packages/tensorflow/include/tensorflow/core/framework/tensor_types.h: In lambda function:
/home/lmancuso/leaf/brunotf/lib/python3.7/site-packages/tensorflow/include/tensorflow/core/framework/tensor_types.h:177:22: error: ‘bool_vals’ was not declared in this scope
       for (bool b : {bool_vals...}) {
                      ^~~~~~~~~

used dataset

Can you provide a dataset that you used,thanks a lot!!!The original dataset has been downloaded but I do not know how to modify it

CVPPP train and test data setup

Hi, I am very new to this area, so it might be a silly question.

I downloaded CVPPP dataset "CVPPP2017_LSC_training.zip" from https://www.plant-phenotyping.org/datasets-download. However, it looks like A1 folder only have 103 data instead of 128+33. On their website, they said "Testing sets are not publicly available (they are blind) but if you want to test on the datasets for comparisons, please use our codalab version of the LSC:". But the dataset is no longer on codalab website any more, unfortunately.

Is there anyway I can get the whole dataset so that I can replicate the result on paper? Many thanks.

Su

Visualization on localhost not working

Hi renmengye,

Thanks again for sharing you work. I get your code working properly on CVPPP dataset, however, I was not able to visualize result on localhost using firefox web browser in Ubuntu 16.04.

I saw log comments "I2608 2018-06-23 11:51:53.361570 experiment.py:167 Visualization can be viewed at: http://localhost/deep-dashboard?id=box_model_cvppp-learn01", so I think it must be showing something on "http://localhost/deep-dashboard?id=box_model_cvppp-learn01", which is not showing on my machine unfortunately. Could you please tell me if I need to do anything on the setting to make it work? Many thanks.

Cheers,
Su

mscoco_ins script is missing

Hi, thanks for your work. I am trying to run run_cvppp.sh but there is a reference to mscoco_ins which is not included in the repository. Would you provide it please? Thanks.

CVPPP training

Hi Mengye,

thanks a lot for sharing the code!
I have a couple of questions about training on CVPPP:

  1. In the paper you mention training on 128 images, but in cvppp.py I see that you also create train/val split (103/25). Did you use all 128 images or only 103 of them for test evaluation?
  2. Are the pre-set numbers of iterations (60K for box net, 30K for full net) the ones used for test evaluation?
  3. I noticed that the pre-processing net (FG+Angles) is not trained for the CVPPP in this implementation. Are the numbers reported in the paper for CVPPP with or without pre-processing?

Thanks in advance,
Nikita

Pretrained models

Hi,
Would you happen to have the models of the trained networks which you published in the paper? I am specifically interested in the CVPPP model.
Thanks!

Error compiling hungarian build

When I try compiling using

./hungarian_build.sh

I get the following errors:

11 warnings generated.
Undefined symbols for architecture x86_64:
  "tensorflow::DEVICE_CPU", referenced from:
      ___cxx_global_var_init.7 in hungarian-8050bd.o
  "tensorflow::TensorShape::DestructorOutOfLine()", referenced from:
      tensorflow::TensorShape::~TensorShape() in hungarian-8050bd.o
  "tensorflow::TensorShape::AddDim(long long)", referenced from:
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
  "tensorflow::TensorShape::TensorShape()", referenced from:
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
  "tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)", referenced from:
      ___cxx_global_var_init in hungarian-8050bd.o
  "tensorflow::OpDefBuilder::Input(tensorflow::StringPiece)", referenced from:
      tensorflow::register_op::OpDefBuilderWrapper<true>::Input(tensorflow::StringPiece) in hungarian-8050bd.o
  "tensorflow::OpDefBuilder::Output(tensorflow::StringPiece)", referenced from:
      tensorflow::register_op::OpDefBuilderWrapper<true>::Output(tensorflow::StringPiece) in hungarian-8050bd.o
  "tensorflow::OpDefBuilder::OpDefBuilder(tensorflow::StringPiece)", referenced from:
      tensorflow::register_op::OpDefBuilderWrapper<true>::OpDefBuilderWrapper(char const*) in hungarian-8050bd.o
  "tensorflow::kernel_factory::OpKernelRegistrar::InitInternal(tensorflow::KernelDef const*, tensorflow::StringPiece, tensorflow::OpKernel* (*)(tensorflow::OpKernelConstruction*))", referenced from:
      tensorflow::kernel_factory::OpKernelRegistrar::OpKernelRegistrar(tensorflow::KernelDef const*, tensorflow::StringPiece, tensorflow::OpKernel* (*)(tensorflow::OpKernelConstruction*)) in hungarian-8050bd.o
  "tensorflow::OpKernelContext::allocate_output(int, tensorflow::TensorShape const&, tensorflow::Tensor**)", referenced from:
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
  "tensorflow::OpKernelContext::CtxFailureWithWarning(tensorflow::Status)", referenced from:
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
  "tensorflow::OpKernelContext::input(int)", referenced from:
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
  "tensorflow::KernelDefBuilder::Device(char const*)", referenced from:
      ___cxx_global_var_init.7 in hungarian-8050bd.o
  "tensorflow::KernelDefBuilder::KernelDefBuilder(char const*)", referenced from:
      tensorflow::register_kernel::Name::Name(char const*) in hungarian-8050bd.o
  "tensorflow::OpDef::~OpDef()", referenced from:
      tensorflow::OpRegistrationData::~OpRegistrationData() in hungarian-8050bd.o
  "tensorflow::OpKernel::OpKernel(tensorflow::OpKernelConstruction*)", referenced from:
      HungarianOp::HungarianOp(tensorflow::OpKernelConstruction*) in hungarian-8050bd.o
  "tensorflow::OpKernel::~OpKernel()", referenced from:
      HungarianOp::~HungarianOp() in hungarian-8050bd.o
  "tensorflow::internal::LogMessage::MinVLogLevel()", referenced from:
      HungarianOp::MinWeightedBipartiteCover(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::GetEqualityGraph(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1> const&) in hungarian-8050bd.o
      HungarianOp::MaxBipartiteMatching(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::Augment(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&) in hungarian-8050bd.o
  "tensorflow::internal::LogMessage::LogMessage(char const*, int, int)", referenced from:
      HungarianOp::MinWeightedBipartiteCover(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::GetEqualityGraph(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1> const&) in hungarian-8050bd.o
      HungarianOp::MaxBipartiteMatching(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::Augment(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&) in hungarian-8050bd.o
  "tensorflow::internal::LogMessage::~LogMessage()", referenced from:
      HungarianOp::MinWeightedBipartiteCover(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::GetEqualityGraph(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1> const&) in hungarian-8050bd.o
      HungarianOp::MaxBipartiteMatching(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::Augment(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&) in hungarian-8050bd.o
  "tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)", referenced from:
      tensorflow::core::RefCounted::~RefCounted() in hungarian-8050bd.o
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
      tensorflow::TensorShape::dims() const in hungarian-8050bd.o
      HungarianOp::MinWeightedBipartiteCover(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::MaxFlow(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&) in hungarian-8050bd.o
      HungarianOp::Augment(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&) in hungarian-8050bd.o
      tensorflow::KernelDefBuilder::~KernelDefBuilder() in hungarian-8050bd.o
      ...
  "tensorflow::internal::LogMessageFatal::~LogMessageFatal()", referenced from:
      tensorflow::core::RefCounted::~RefCounted() in hungarian-8050bd.o
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
      tensorflow::TensorShape::dims() const in hungarian-8050bd.o
      HungarianOp::MinWeightedBipartiteCover(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*, Eigen::Matrix<float, -1, -1, 1, -1, -1>*) in hungarian-8050bd.o
      HungarianOp::MaxFlow(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&) in hungarian-8050bd.o
      HungarianOp::Augment(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&, Eigen::Matrix<float, -1, -1, 1, -1, -1>&) in hungarian-8050bd.o
      tensorflow::KernelDefBuilder::~KernelDefBuilder() in hungarian-8050bd.o
      ...
  "tensorflow::internal::CheckOpMessageBuilder::ForVar2()", referenced from:
      std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in hungarian-8050bd.o
  "tensorflow::internal::CheckOpMessageBuilder::NewString()", referenced from:
      std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in hungarian-8050bd.o
  "tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)", referenced from:
      std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in hungarian-8050bd.o
  "tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()", referenced from:
      std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in hungarian-8050bd.o
  "tensorflow::TensorShape::CheckDimsEqual(int) const", referenced from:
      Eigen::DSizes<long, 3> tensorflow::TensorShape::AsEigenDSizes<3>() const in hungarian-8050bd.o
      Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizes<2>() const in hungarian-8050bd.o
  "tensorflow::TensorShape::CheckDimsAtLeast(int) const", referenced from:
      Eigen::DSizes<long, 3> tensorflow::TensorShape::AsEigenDSizesWithPadding<3>() const in hungarian-8050bd.o
      Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizesWithPadding<2>() const in hungarian-8050bd.o
  "tensorflow::TensorShape::dim_size(int) const", referenced from:
      HungarianOp::Compute(tensorflow::OpKernelContext*) in hungarian-8050bd.o
      HungarianOp::ComputeHungarianBatch(tensorflow::Tensor const&, tensorflow::Tensor*, tensorflow::Tensor*, tensorflow::Tensor*) in hungarian-8050bd.o
      HungarianOp::ComputeHungarian(tensorflow::Tensor const&, tensorflow::Tensor*, tensorflow::Tensor*, tensorflow::Tensor*) in hungarian-8050bd.o
      Eigen::DSizes<long, 3> tensorflow::TensorShape::AsEigenDSizesWithPadding<3>() const in hungarian-8050bd.o
      HungarianOp::CopyInput(tensorflow::Tensor const&) in hungarian-8050bd.o
      HungarianOp::CopyOutput(Eigen::Matrix<float, -1, -1, 1, -1, -1> const&, tensorflow::Tensor*) in hungarian-8050bd.o
      Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizesWithPadding<2>() const in hungarian-8050bd.o
      ...
  "tensorflow::Tensor::tensor_data() const", referenced from:
      HungarianOp::CopyInput(tensorflow::Tensor const&) in hungarian-8050bd.o
  "tensorflow::Tensor::CheckTypeAndIsAligned(tensorflow::DataType) const", referenced from:
      tensorflow::TTypes<float, 3ul, long>::ConstTensor tensorflow::Tensor::tensor<float, 3ul>() const in hungarian-8050bd.o
      tensorflow::TTypes<float, 3ul, long>::Tensor tensorflow::Tensor::tensor<float, 3ul>() in hungarian-8050bd.o
      tensorflow::TTypes<float, 2ul, long>::Tensor tensorflow::Tensor::tensor<float, 2ul>() in hungarian-8050bd.o
  "typeinfo for tensorflow::OpKernel", referenced from:
      typeinfo for HungarianOp in hungarian-8050bd.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Tried using TensorFlow 1.0 and TensorFlow 0.12 both, same error.

Error in CVPPP - num_train should be an integer

Running ./setup_cvppp.sh throws following error:

Traceback (most recent call last):
  File "./setup_cvppp.py", line 21, in <module>
    main()
  File "./setup_cvppp.py", line 13, in main
    os.path.join(train_folder, subset), opt, split=split).assemble()
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/cvppp.py", line 25, in __init__
    super(CVPPPAssembler, self).__init__(opt, output_fname)
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/ins_seg_assembler.py", line 21, in __init__
    self.img_ids = self.read_ids()
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/cvppp.py", line 32, in read_ids
    self.write_split()
  File "/Users/abhinandandubey/Library/Mobile Documents/com~apple~CloudDocs/S17/cell-division/f17/rec-attend-public/data_api/cvppp.py", line 81, in write_split
    train_ids = image_ids[idx[:num_train]]
TypeError: slice indices must be integers or None or have an __index__ method

Line 81 in write_split method has num_train variable which holds a float value, should be changed to integer value:

print(num_train)
103.0

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.