Comments (10)
This sounds like you are inputting images with 4 channels while having the model configured to take 3 channels as inputs.
As you were mentioning png inputs earlier, I'm assuming that you're reading the data as RGBA instead of RGB.
If you do not need the fourth channel, you can strip it away (img = img[:3]
). If you do indeed need the fourth channel, you can set input_channels: 4
in the config.yml
file.
from hed-unet.
from hed-unet.
from hed-unet.
from hed-unet.
Can you make sure that the loaded image array has only 3 channels? I.e. by adding print(img.shape)
to the full_forward
method in train.py
?
from hed-unet.
from hed-unet.
Assuming you're using the provided INRIA data loading code, that will tile each input image into tiles of 256x256 (see the TILESIZE = 256
constant in deep_learning/utils/data.py
.
I still believe that the fourth channel comes from the alpha channel in the png, could you simply cut it off by changing data = raster.read()
to data = raster.read()[:3]
in deep_learning/utils/data.py
(and then also removing the cached .npz
files?)
from hed-unet.
from hed-unet.
Yes but png files can have 4 channels, and when you convert them to tiff that 4th channel is probably kept. Could you please simply try the solution I suggested? Or what do you expect me to do here?
from hed-unet.
from hed-unet.
Related Issues (18)
- How could I get the complete images on result HOT 1
- Training steps HOT 4
- Is the image input during the training process the original image and the binary image? HOT 17
- Testing data HOT 7
- Whether this program can handle .png files. If you can’t handle it, can you convert the .tif file to a .png file? HOT 1
- AttributeError: 'Array' object has no attribute 'numpy' HOT 1
- Hello, my training is successful, then I would like to ask how to test my own data? HOT 1
- About training HOT 21
- About Loss HOT 5
- About mutil classes HOT 19
- Hed HOT 7
- Weight Map HOT 2
- I have some questions about testing. HOT 6
- About the differences between predictions and queries. HOT 3
- Does the edge detection task have an impact on the semantic segmentation task in this model? HOT 1
- Can you please share the pre-trained weights for interence HOT 1
- Can the author provide code for prediction
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 hed-unet.