sudecki30 / labels

Labels image/picture for deeplearning
GNU General Public License v3.0
1 stars 0 forks source link

version #2

Open Love-Studyyy opened 3 years ago

Love-Studyyy commented 3 years ago

Can you list the corresponding version of dependent packages? I guess it influences a lot.

sudecki30 commented 3 years ago

Hi, I will answer you today or tomorrow 😉

Love-Studyyy commented 3 years ago

Hi, thank you very much! It is very helpful! I’ve successfully converted png to json the day before yesterday morning. But I messed version of packages. It's been a failure till now

Love-Studyyy commented 3 years ago

“cv.findcontours” can't find contours and hierarchy return "(0,0,0,0)"

sudecki30 commented 3 years ago

What is your data collection?

Love-Studyyy commented 3 years ago

png images are 8-bit depth gray images jpeg images are 24-bit depth RGB images

sudecki30 commented 3 years ago

To correct this, “cv.findcontours” can't find contours and hierarchy return "(0,0,0,0)", are you modified correctly the json file "parameter", with the correct level of grey (in color option of each labels? Because my code work normally on RGB images as png

Love-Studyyy commented 3 years ago

Do you mean png images are RGB format?

sudecki30 commented 3 years ago

yes one of my png aachen_000000_000019

sudecki30 commented 3 years ago

each color is a label, you can in grey, but you need to define each label to correspond at an intensity of grey (warning, it is not turple of value but 1D in json files if you use grey color)

to test easilier, you can comment the two last line of the code and use :" # for j in range(l): image_to_json_partial(j)"

sudecki30 commented 3 years ago

A solution for you if intensity of grey = the label number _mask=(image_label == categoryid).all(-1)

Love-Studyyy commented 3 years ago

You are so enthusiastic! Thank you very much! I'm trying!

sudecki30 commented 3 years ago

BE careful, i know, for example the png of citymap have a little image frame around, if it is it, you need to resize image of label and jpeg before to delete it. (it can explain the error you get “cv.findcontours” can't find contours and hierarchy return "(0,0,0,0)")

Good luck

Love-Studyyy commented 3 years ago

ok, thanks a lot! And the version of packages can you list?😉 like: opencv, numpy, shapely ..

sudecki30 commented 3 years ago

numpy 1.20.2 opencv-python 4.5.2.54 python 3.8.10 scipy 1.7.0 scikit-image 0.18.1 shapely 1.7.1 tqdm 4.61.1

I have updated the code, now it works with updated package

Love-Studyyy commented 3 years ago

Thank you so much!😉 you are very enthusiastic and patient! good luck to you!!