Code Monkey home page Code Monkey logo

ternaus / ternausnetv2 Goto Github PK

View Code? Open in Web Editor NEW
546.0 28.0 112.0 6.21 MB

TernausNetV2: Fully Convolutional Network for Instance Segmentation

Home Page: http://openaccess.thecvf.com/content_cvpr_2018_workshops/papers/w4/Iglovikov_TernausNetV2_Fully_Convolutional_CVPR_2018_paper.pdf

License: BSD 3-Clause "New" or "Revised" License

Jupyter Notebook 95.93% Python 2.32% Cuda 0.88% C++ 0.87%
satellite-imagery computer-vision image-segmentation deep-learning python pytorch

ternausnetv2's Introduction

TernausNetV2: Fully Convolutional Network for Instance Segmentation

teaser

We present network definition and weights for our second place solution in CVPR 2018 DeepGlobe Building Extraction Challenge.

Team members

Vladimir Iglovikov, Selim Seferbekov, Alexandr Buslaev, Alexey Shvets

Citation

If you find this work useful for your publications, please consider citing:

@InProceedings{Iglovikov_2018_CVPR_Workshops,
     author = {Iglovikov, Vladimir and Seferbekov, Selim and Buslaev, Alexander and Shvets, Alexey},
      title = {TernausNetV2: Fully Convolutional Network for Instance Segmentation},
  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
      month = {June},
       year = {2018}
      }

Overview

Automatic building detection in urban areas is an important task that creates new opportunities for large scale urban planning and population monitoring. In a CVPR 2018 Deepglobe Building Extraction Challenge participants were asked to create algorithms that would be able to perform binary instance segmentation of the building footprints from satellite imagery. Our team finished second and in this work we share the description of our approach, network weights and code that is sufficient for inference.

Data

The training data for the building detection subchallenge originate from the SpaceNet dataset. The dataset uses satellite imagery with 30 cm resolution collected from DigitalGlobe’s WorldView-3 satellite. Each image has 650x650 pixels size and covers 195x195 m2 of the earth surface. Moreover, each region consists of high-resolution RGB, panchromatic, and 8-channel low-resolution multi-spectral images. The satellite data comes from 4 different cities: Vegas, Paris, Shanghai, and Khartoum with different coverage, of (3831, 1148, 4582, 1012) images in the train and (1282, 381, 1528, 336) images in the test sets correspondingly.

Method

The originial TernausNet was extened in a few ways:
  1. The encoder was replaced with WideResnet 38 that has In-Place Activated BatchNorm.
  2. The input to the network was extended to work with 11 input channels. Three for RGB and eight for multispectral data.

    In order to make our network to perform instance segmentation, we utilized the idea that was proposed and successfully executed by Alexandr Buslaev, Selim Seferbekov and Victor Durnov in their winning solutions of the Urban 3d and Data Science Bowl 2018 challenges.

  3. Output of the network was modified to predict both the binary mask in which we predict building / non building classes on the pixel level and binary mask in which we predict areas of an image where different objects touch or very close to each other. These predicted masks are combined and used as an input to the watershed transform.

network

Results

Result on the public and private leaderboard with respect to the metric that was used by the organizers of the CVPR 2018 DeepGlobe Building Extraction Challenge.

Results per city
City: Public Leaderboard Private Leaderboard
Vegas 0.891 0.892
Paris 0.781 0.756
Shanghai 0.680 0.687
Khartoum 0.603 0.608
------------- ------------------- -------------------
Average 0.739 0.736

Dependencies

  • Python 3.6
  • PyTorch 0.4
  • numpy 1.14.0
  • opencv-python 3.3.0.10

Demo Example

Network weights

You can easily start using our network and weights, following the demonstration example

demo.ipynb

ternausnetv2's People

Contributors

abdinoor avatar marsbroshok avatar ternaus 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ternausnetv2's Issues

Additional tricks / post processing steps?

I wonder regarding geospatial semantic segmentation is there any tricks/post processing steps to make objects like house have sharp box like shape(i.e. naive solution give smooth shapes without sharp corners).

problem with minmax function

In[9]:

def load_image(file_name_rgb, file_name_tif):    
    rgb = tiff.imread(str(file_name_rgb))    
    rgb = minmax(rgb)    
    tf = tiff.imread(str(file_name_tif)).astype(np.float32) / (2**11 - 1)
    
    return np.concatenate([rgb, tf], axis=2) * (2**8 - 1)

When I run this part an error occurs, can someone help me?
in.py is a file where I put TernausNet Demo!


runfile('C:/Users/L.DEOLIVEIRATRINDADE/Documents/04. Programas desenvolvidos/TernausNetV2-master/in.py', wdir='C:/Users/L.DEOLIVEIRATRINDADE/Documents/04. Programas desenvolvidos/TernausNetV2-master')
Reloaded modules: models, models.ternausnet2, modules, modules.bn, modules.functions, modules.wider_resnet, modules.misc, modules.residual
Traceback (most recent call last):

File "", line 1, in
runfile('C:/Users/L.DEOLIVEIRATRINDADE/Documents/04. Programas desenvolvidos/TernausNetV2-master/in.py', wdir='C:/Users/L.DEOLIVEIRATRINDADE/Documents/04. Programas desenvolvidos/TernausNetV2-master')

File "C:\ProgramData2\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
execfile(filename, namespace)

File "C:\ProgramData2\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/L.DEOLIVEIRATRINDADE/Documents/04. Programas desenvolvidos/TernausNetV2-master/in.py", line 108, in
img = load_image(file_name_rgb, file_name_tif)

File "C:/Users/L.DEOLIVEIRATRINDADE/Documents/04. Programas desenvolvidos/TernausNetV2-master/in.py", line 80, in load_image
rgb = minmax(rgb)

NameError: name 'minmax' is not defined

Import error: from models.ternausnet2 import TernausNetV2

Hi, i was trying to use the demo.ipynb file given, but it throws an import error.

ImportError                               Traceback (most recent call last)
<ipython-input-2-b7b37541d9f9> in <module>
----> 1 from models.ternausnet2 import TernausNetV2

~\Downloads\worldview3\TernausNetV2\models\__init__.py in <module>
----> 1 from .resnext import *
      2 from .resnet import *
      3 from .wider_resnet import *
      4 from .densenet import *

~\Downloads\worldview3\TernausNetV2\models\resnext.py in <module>
      5 import torch.nn as nn
      6 
----> 7 from modules import IdentityResidualBlock, ABN, GlobalAvgPool2d
      8 from ._util import try_index
      9 

~\Downloads\worldview3\TernausNetV2\modules\__init__.py in <module>
----> 1 from .bn import ABN, InPlaceABN, InPlaceABNSync
      2 from .functions import ACT_RELU, ACT_LEAKY_RELU, ACT_ELU, ACT_NONE
      3 from .misc import GlobalAvgPool2d, SingleGPU
      4 from .residual import IdentityResidualBlock
      5 from .dense import DenseModule

~\Downloads\worldview3\TernausNetV2\modules\bn.py in <module>
      8     from Queue import Queue
      9 
---> 10 from .functions import *
     11 
     12 

~\Downloads\worldview3\TernausNetV2\modules\functions.py in <module>
     16                     "inplace_abn_cuda_half.cu"
     17                 ]],
---> 18                 extra_cuda_cflags=["--expt-extended-lambda"])
     19 
     20 # Activation names

C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py in load(name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, build_directory, verbose, with_cuda, is_python_module)
    642         verbose,
    643         with_cuda,
--> 644         is_python_module)
    645 
    646 

C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py in _jit_compile(name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, build_directory, verbose, with_cuda, is_python_module)
    822     if verbose:
    823         print('Loading extension module {}...'.format(name))
--> 824     return _import_module_from_library(name, build_directory, is_python_module)
    825 
    826 

C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py in _import_module_from_library(module_name, path, is_python_module)
    965 def _import_module_from_library(module_name, path, is_python_module):
    966     # https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path
--> 967     file, path, description = imp.find_module(module_name, [path])
    968     # Close the .so file after load.
    969     with file:

C:\ProgramData\Anaconda3\lib\imp.py in find_module(name, path)
    294         break  # Break out of outer loop when breaking out of inner loop.
    295     else:
--> 296         raise ImportError(_ERR_MSG.format(name), name=name)
    297 
    298     encoding = None

ImportError: No module named 'inplace_abn' 

conda version: 4.6.14
python: 3.7
cuda: 10.1
pytorch: 1.0
gcc: 5.4

RuntimeError: CUDA Error encountered in <function CompiledLib.bn_forward_cuda at 0x7f2dfa433730>

Hi,
I'm trying to run Demo.ipynb but it breaks on the following line:

prediction = F.sigmoid(model(input_img)).data[0].cpu().numpy()

The error I get is below which I traced to line 16 of modules/functions.py

RuntimeError: CUDA Error encountered in <function CompiledLib.bn_forward_cuda at 0x7f2dfa433730>

Tracing the error, I see that it stems from conv2 = self.conv2(self.pool(conv1)) here.

I am not exactly sure how to fix it.
Kindly advise.

Could you please upload the weight folder?

Hi,

Thank you very much for sharing the original codes for TernausNetV2.

During reproducing the result, could you please share the weight folder, otherwise, even the example jupyter notebook cannot re-run and throws error "FileNotFoundError: [Errno 2] No such file or directory: 'weights/deepglobe buildings.pt'"

thank you very much,

Xiao

Error: cannot import name '_ext'

hi,

Thank you for your v2 TernausNet, I appreciate your paper on arXiv and I follow your several papers and like the clear logic and intuition.

When I run this code in Demo file, I face an error
ImportError: cannot import name '_ext'
during running this command:
from models.ternausnet2 import TernausNetV2

I check it and find it results from this line:
from . import _ext
from modules\functions.py

I google it and cannot figure how from . import _ext works at all.

Could you please give me some hint to solve this issue?

Thank you very much!

Best,
Xiao

Label preprocessing?

Hello,

Any points to how did you pre-process the labels to get a prediction for the buildings and a prediction for the touching boundaries?

Further train the model

I am using TernausNetV2 for my project. Although it is doing phenomenal job in most of the places, there are some areas in Khartoum where it performs very poorly. I have the training data for the building detection from SpaceNet dataset as well as data from other sources and would like to train your model further.

What is the correct way to train your model further using existing weights rather than starting fresh ?

contour creation

Hey Vladimir,

In one of the other issues you shared your contour creation function:

def create_contour(labels):
    mask = labels.copy()
    mask[mask > 0] = 1
    dilated = binary_dilation(mask, iterations=4)
    mask_wl = watershed(dilated, labels, mask=dilated, watershed_line=True)
    mask_wl[mask_wl > 0] = 1
    contours = dilated - mask_wl
    contours = binary_dilation(contours, iterations=3)
    return contours

Could you please also share what's going on with the binary_dilation function? I don't believe that's the standard skimage function. Are you trying to adaptively set the dilation amount like the winners of the 2018 DSB did?

How to train on cityscapes?

Hi, thanks for this wonderful work. Is there instructions or tutorials about how to train TernausNet model on cityscapes datasets?

GeoTiff Loading/Image Preprocessing

I was using the load_image function given in the demo.ipynb notebook. I tested it for vegas and paris. For vegas i am getting image similar to what we get when viewed with some gis software, but for paris I am getting a darker image. Do we need to do some different pre-processing here?

Attaching links of the image which are being loaded
Vegas: https://imgur.com/a/gcH1C60
Paris (from load_image function): https://imgur.com/a/HoOTWZE

Transfer Learning

I want to use my own dataset, but I don't want to train the network from scratch. How can I implement transfer learning on the pre-trained network?

result Wrong

image

Hi, I have used your weight and predict the same TIF. Why the result looks so weild?

RuntimeError: Error building extension 'inplace_abn'

Anyone happen to encounter the same problem? My envrionment:
Ubuntu 16.04
Torch 1.0
ninja 1.8.2.post2
cuda 9.2

RuntimeError: Error building extension 'inplace_abn': [1/3] c++ -MMD -MF inplace_abn_cpu.o.d -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -O3 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp -o inplace_abn_cpu.o
FAILED: inplace_abn_cpu.o
c++ -MMD -MF inplace_abn_cpu.o.d -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -O3 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp -o inplace_abn_cpu.o
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp: In function ‘std::vectorat::Tensor backward_cpu(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, bool, float)’:
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp:82:34: error: could not convert ‘z.at::Tensor::type()’ from ‘at::Type’ to ‘c10::IntList {aka c10::ArrayRef}’
auto dweight = at::empty(z.type(), {0});
^
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp:83:32: error: could not convert ‘z.at::Tensor::type()’ from ‘at::Type’ to ‘c10::IntList {aka c10::ArrayRef}’
auto dbias = at::empty(z.type(), {0});
^
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp:89:29: error: could not convert ‘{dx, dweight, dbias}’ from ‘’ to ‘std::vectorat::Tensor’
return {dx, dweight, dbias};
^
[2/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' --expt-extended-lambda -std=c++11 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
FAILED: inplace_abn_cuda.cuda.o
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' --expt-extended-lambda -std=c++11 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(99): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(99): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(100): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(100): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(202): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(202): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(203): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists

/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(203): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)

8 errors detected in the compilation of "/tmp/tmpxft_000052c0_00000000-6_inplace_abn_cuda.cpp1.ii".
ninja: build stopped: subcommand failed.

error from . import _ext

Hello, I am trying to use your code and it cannot find _ext. I get the following error

File "/home/johnny/Software/domain-exploration/TernausNetV2/models/init.py", line 1, in
from .wider_resnet import *
File "/home/johnny/Software/domain-exploration/TernausNetV2/models/wider_resnet.py", line 8, in
from modules import IdentityResidualBlock, ABN, GlobalAvgPool2d
File "/home/johnny/Software/domain-exploration/TernausNetV2/modules/init.py", line 1, in
from .bn import ABN, InPlaceABN, InPlaceABNWrapper
File "/home/johnny/Software/domain-exploration/TernausNetV2/modules/bn.py", line 9, in
from .functions import inplace_abn
File "/home/johnny/Software/domain-exploration/TernausNetV2/modules/functions.py", line 5, in
from . import _ext
ImportError: cannot import name '_ext'

RuntimeError: Given groups=1, weight of size [64, 11, 3, 3], expected input[1, 6 72, 672, 11] to have 11 channels, but got 672 channels instead

Running Demo.ipynb yields runtime error at line:
prediction = torch.sigmoid(model(input_img)).data[0].cpu().numpy()

RuntimeError: Given groups=1, weight of size [64, 11, 3, 3], expected input[1, 6
72, 672, 11] to have 11 channels, but got 672 channels instead

Running:
python3/3.6.7
pytorch/0.4.1-py36
cuda/9.0
gcc/4.9.0
opencv-python/3.4.4
numpy/1.15.4

Any suggestions appreciated.

TernausNetV2 import error.

Importing TernausNetV2 in Demo.ipynb throws the following error:

Code:
from models.ternausnet2 import TernausNetV2

Error:

<ipython-input-1-b7b37541d9f9> in <module>
----> 1 from models.ternausnet2 import TernausNetV2

~/Desktop/TernausNetV2/models/ternausnet2.py in <module>
      9 from torch.nn import Sequential
     10 from collections import OrderedDict
---> 11 from modules.bn import ABN
     12 
     13 from modules.wider_resnet import WiderResNet

~/Desktop/TernausNetV2/modules/bn.py in <module>
      7 from queue import Queue
      8 
----> 9 from .functions import (ACT_ELU, ACT_RELU, ACT_LEAKY_RELU, inplace_abn, inplace_abn_sync)
     10 
     11 

~/Desktop/TernausNetV2/modules/functions.py in <module>
     16                     "inplace_abn_cuda.cu"
     17                 ]],
---> 18                 extra_cuda_cflags=["--expt-extended-lambda"])
     19 
     20 # Activation names

~/anaconda3/envs/ternausnetv2/lib/python3.6/site-packages/torch/utils/cpp_extension.py in load(name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, build_directory, verbose)
    507     if verbose:
    508         print('Loading extension module {}...'.format(name))
--> 509     return _import_module_from_library(name, build_directory)
    510 
    511 

~/anaconda3/envs/ternausnetv2/lib/python3.6/site-packages/torch/utils/cpp_extension.py in _import_module_from_library(module_name, path)
    588     # Close the .so file after load.
    589     with file:
--> 590         return imp.load_module(module_name, file, path, description)
    591 
    592 

~/anaconda3/envs/ternausnetv2/lib/python3.6/imp.py in load_module(name, file, filename, details)
    241                 return load_dynamic(name, filename, opened_file)
    242         else:
--> 243             return load_dynamic(name, filename, file)
    244     elif type_ == PKG_DIRECTORY:
    245         return load_package(name, filename)

~/anaconda3/envs/ternausnetv2/lib/python3.6/imp.py in load_dynamic(name, path, file)
    341         spec = importlib.machinery.ModuleSpec(
    342             name=name, loader=loader, origin=path)
--> 343         return _load(spec)
    344 
    345 else:

ImportError: /tmp/torch_extensions/inplace_abn/inplace_abn.so: undefined symbol: __cudaPopCallConfiguration

Upgrading torch from 0.4.0 to 0.4.1 solved the issue. Currently the README specifies version as 0.4 which is ambiguous. Perhaps it should reflect that? Or is the reason for error something else?

the binary mask

Hello, I have a question: how to predict areas of an image (binary mask) where different objects touch or very close to each other?

runtime error: CUDNN_STATUS_MAPPING_ERROR

When I execute “prediction = F.sigmoid(model(input_img)).data[0].cpu().numpy()” is reporting error “runtime error: CUDNN_STATUS_MAPPING_ERROR”,what should I do ? thank you very much!

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.