Git Product home page Git Product logo

Comments (1)

harshays98 avatar harshays98 commented on August 20, 2024

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)

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.