Code Monkey home page Code Monkey logo

Comments (2)

rayguan97 avatar rayguan97 commented on September 25, 2024

It’s very likely that the processing script is not suitable for your dataset. You need to figure out the logics for processing RUGD and apply to your dataset. I could not figure out the issue based on the information you provided.

If the first img is the ID img, it should not have white color as the value is vary large. So it must be some bugs directly using rugd script for your dataset. You might have to go through your code and figure out the specific bugs.

I’m closing the issue since it’s not about processing of rugd or rellis dataset.

from ganav-offroad.

LancerXE avatar LancerXE commented on September 25, 2024

Thanks for your reply!
Yes, it is the ID img, it seems that all the background are painted in white in that image.
I think I found the problem, in the '( )_relabel6.py' file , at line 35:
color_id[tuple([0, 0, 0])] = 255
This line of code will change the id of the class with RGB value (0, 0, 0) to 255, I'm not sure what is this line of code used for.
When I run the original 'rugd_relabel6.py' in colab, I added two print() function to see the value of the parameter 'color_id', and it turns out after running the code color_id[tuple([0, 0, 0])] = 255, an extra value (0, 0, 0): 255 is added to the parameter 'color_id':

PALETTE = [ [ 108, 64, 20 ], [ 255, 229, 204 ],[ 0, 102, 0 ],[ 0, 255, 0 ],
            [ 0, 153, 153 ],[ 0, 128, 255 ],[ 0, 0, 255 ],[ 255, 255, 0 ],[ 255, 0, 127 ],
            [ 64, 64, 64 ],[ 255, 128, 0 ],[ 255, 0, 0 ],[ 153, 76, 0 ],[ 102, 102, 0 ],
            [ 102, 0, 0 ],[ 0, 255, 128 ],[ 204, 153, 255 ],[ 102, 0, 204 ],[ 255, 153, 204 ],
            [ 0, 102, 102 ],[ 153, 204, 255 ],[ 102, 255, 255 ],[ 101, 101, 11 ],[ 114, 85, 47 ] ]
color_id = {tuple(c):i for i, c in enumerate(PALETTE)}
print(color_id)
color_id[tuple([0, 0, 0])] = 255
print(color_id)

result:

{(108, 64, 20): 0, (255, 229, 204): 1, (0, 102, 0): 2, (0, 255, 0): 3, (0, 153, 153): 4, (0, 128, 255): 5, (0, 0, 255): 6, (255, 255, 0): 7, (255, 0, 127): 8, (64, 64, 64): 9, (255, 128, 0): 10, (255, 0, 0): 11, (153, 76, 0): 12, (102, 102, 0): 13, (102, 0, 0): 14, (0, 255, 128): 15, (204, 153, 255): 16, (102, 0, 204): 17, (255, 153, 204): 18, (0, 102, 102): 19, (153, 204, 255): 20, (102, 255, 255): 21, (101, 101, 11): 22, (114, 85, 47): 23}
{(108, 64, 20): 0, (255, 229, 204): 1, (0, 102, 0): 2, (0, 255, 0): 3, (0, 153, 153): 4, (0, 128, 255): 5, (0, 0, 255): 6, (255, 255, 0): 7, (255, 0, 127): 8, (64, 64, 64): 9, (255, 128, 0): 10, (255, 0, 0): 11, (153, 76, 0): 12, (102, 102, 0): 13, (102, 0, 0): 14, (0, 255, 128): 15, (204, 153, 255): 16, (102, 0, 204): 17, (255, 153, 204): 18, (0, 102, 102): 19, (153, 204, 255): 20, (102, 255, 255): 21, (101, 101, 11): 22, (114, 85, 47): 23, (0, 0, 0): 255}

So I tried to comment out this line of code for my own dataset, and after pre-processing the processed image looked like this:

left0290_orig

So there's no white color on the iD img now, since there are just 6 classes represented by RGB value from 0~5, all the pixel are in low RGB values, so theoretically it should be correct. So I think may be this line of code is not nessary: color_id[tuple([0, 0, 0])] = 255.

from ganav-offroad.

Related Issues (20)

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.