Comments (1)
i have trained the model for 5 classes
but the prdiction shape is like (1,512,512,5)
`
c1 = [0,0,255] #red
c2 = [0,250,0] #green
c3 = [0,250,255]
c4 = [255,250,0]
c5= [128,128,0]
c6 = [55,55,0]
Unlabelled = [0,0,0]
COLOR_DICT = np.array([ c1, c2,c3,c4,c5,c6, Unlabelled])
class_name = [ 'c1', 'c2', 'c3','c4','c5','c6', 'None'] # You must define by yourself
def labelVisualize(num_class, color_dict, img):
img_out = np.zeros(img[:,:,0].shape + (3,))
for i in range(img.shape[0]):
for j in range(img.shape[1]):
index_of_class = np.argmax(img[i,j])
#print(index_of_class)
img_out[i,j] = color_dict[index_of_class]
return img_out
after this im getting ouput as only one color is filled to entire image
please suggest how to solve this problem ?
from u-net-with-multiple-classification.
Related Issues (7)
- 系统找不到指定的路径。: '/data/catndog/train/image',已经建立了文件夹,怎么还是报错 HOT 2
- two questions HOT 4
- 请问如何开始? HOT 3
- Dice loss
- 关于mask数据的reshape HOT 1
- import ERROR HOT 1
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 u-net-with-multiple-classification.