Comments (3)
Dear Beargolden,
Thanks for your interest. In the evaluation code, I used stride_h and stride_w for moving a window across the image for choosing the patch, it may miss some pixels from the right and bottom of the image. Generally speaking, with stride 1 it will cover all the pixels and size will be identical to input image size but it will increase the computation time. It is not hard to fix it, I will fix it as soon as I have free time.
One simple approach is to add zero paddings to the image and get rid of it after prediction. This way you dont need to modify any function. for example:
Test_image with size 512*400
New_test = np.zeros((Test_image.shape[0]+stride_h, Test_image.shape[1]+stride_w))
New_test[0:Test_image.shape[0], 0: Test_image.shape[1]] = Test_image
with above code we added zero padding to bottom and right side of the image
now apply the patch and estimation then get the desired region. for example:
result = estimated[0:Test_image.shape[0], 0: Test_image.shape[1]]
It should produce an identical image.
from bcdunet_dibco.
Dear Beargolden,
Thanks for your interest. In the evaluation code, I used stride_h and stride_w for moving a window across the image for choosing the patch, it may miss some pixels from the right and bottom of the image. Generally speaking, with stride 1 it will cover all the pixels and size will be identical to input image size but it will increase the computation time. It is not hard to fix it, I will fix it as soon as I have free time.
One simple approach is to add zero paddings to the image and get rid of it after prediction. This way you dont need to modify any function. for example:
Test_image with size 512*400
New_test = np.zeros((Test_image.shape[0]+stride_h, Test_image.shape[1]+stride_w))
New_test[0:Test_image.shape[0], 0: Test_image.shape[1]] = Test_image
with above code we added zero padding to bottom and right side of the image
now apply the patch and estimation then get the desired region. for example:
result = estimated[0:Test_image.shape[0], 0: Test_image.shape[1]]It should produce an identical image.
Hello, Reza,
Thank you for your instruction. It can temporarily solve the problem, but the performance of resulting binary images is not as high as computed in Evaluate.py~
Merry Christmas!
from bcdunet_dibco.
sorry for the late replay, generally speaking adding some pixels around the corner of the image should not change the performance much, check your code again.
from bcdunet_dibco.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcdunet_dibco.