All Projects → JamesQFreeman → Pointrend

JamesQFreeman / Pointrend

Licence: mit
an numpy-based implement of PointRend

Projects that are alternatives of or similar to Pointrend

Ktext
Utilities for preprocessing text for deep learning with Keras
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Complex Network
复杂网络研究资源整理和基础知识学习
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Sirajscodingchallenges
Code for Siraj Raval's Coding Challenges!
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Lstm networks
This is the code for "LSTM Networks - The Math of Intelligence (Week 8)" By Siraj Raval on Youtube
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Coms4995 S20
COMS W4995 Applied Machine Learning - Spring 20
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Principles Of Machine Learning Python
Principles of Machine Learning Python
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Ml Python
Stars: ✭ 180 (-2.17%)
Mutual labels:  jupyter-notebook
Qhue
A very lightweight Python wrapper to the Philips Hue API
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Gans From Theory To Production
Material for the tutorial: "Deep Diving into GANs: from theory to production"
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Autochecker4chinese
中文文本错别字检测以及自动纠错 / Autochecker & autocorrecter for chinese
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Www Coursera Downloader
This Jupyter Notebook will help you downloading Coursera videos, subtitles and quizzes (but not answering the quiz). It will automatically download and convert vtt subtitle files into srt. All resources downloaded are numbered according to their sequence.
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Object Oriented Programming Using Python
Python is a multi-paradigm programming language. Meaning, it supports different programming approach. One of the popular approach to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP).
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Deep Ttf
Survival analsyis and time-to-failure predictive modeling using Weibull distributions and Recurrent Neural Networks in Keras
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Principle Of Web Search
北京邮电大学“网络搜索原理”课程资料(2019)
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Practical Machine Learning With Python
Machine Learning Tutorials in Python
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Mlss2018 Madrid Gan
MLSS 2018 Madrid lecture materials on Generative Adversarial Networks (GANs)
Stars: ✭ 182 (-1.09%)
Mutual labels:  jupyter-notebook
Janggu
Deep learning infrastructure for bioinformatics
Stars: ✭ 174 (-5.43%)
Mutual labels:  jupyter-notebook
Data Science For Covid 19
DS4C: Data Science for COVID-19 in South Korea
Stars: ✭ 184 (+0%)
Mutual labels:  jupyter-notebook
Machine Learning
Experiments, algorithms and reports in machine learning reseach.
Stars: ✭ 183 (-0.54%)
Mutual labels:  jupyter-notebook
Cufflinks
Productivity Tools for Plotly + Pandas
Stars: ✭ 2,416 (+1213.04%)
Mutual labels:  jupyter-notebook

PointRend

An numpy-based implement of PointRend

This is an implement a PointRend function for Segmentation result refinement. The paper can be find at https://arxiv.org/pdf/1912.08193.pdf The official implement can be find at https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend

Usage

copy the pointGenerate.py to your directory and you are ready to rock.

from pointGenerate import getpoint
my_mask = np.asarray(Image.open("tree_mask.jpg").resize((32,32)))
# convert this 3-channel binary mask to a 1-channel binary one
my_mask = my_mask[:,:,0]
# get the point, nearest_neighbor chose the sample points locations
points = getpoint(my_mask, k=2, beta = 0.95, nearest_neighbor=1)

# plot the result
points = list(zip(*points))
plt.imshow(my_mask,cmap="Purples")
plt.scatter(points[1],points[0],c='black',s=4)

Some result

the original image and mask:

mask img

when the mask is 32*32

mask size 32

when the mask is 64*64 mask size 32

when the mask is 128*128 mask size 32

Improvement

When I was using this, I find the speed is horrible , so I improved the point selection process by storing the it. The point selection process is significantly accelerated while the image is large. However you want to use the old one, just use getpoint(new_if_near=False). The performance improvement is shown below, and a fancy but totally unnecessary figure is plotted.

#points original improved
196 6.11 ms ± 122 µs 1.3 ms ± 8.4 µs
1960 61.8 ms ± 2.92 ms 3.93 ms ± 383 µs
19600 609 ms ± 14.3 ms 28.2 ms ± 643 µs
196000 6.28 s ± 99.9 ms 267 ms ± 12.7 ms

performance improvement

In the future

  1. We will test this on V-Net to see if there are some segmentation performance boost.
  2. If any one feel like trying the PointRend on Mask-rcnn, leave the comments in the issue.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].