Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new user looking for examples of multilabel classification #38

Open
calebjacksonhoward opened this issue Apr 23, 2019 · 7 comments
Open

Comments

@calebjacksonhoward
Copy link

calebjacksonhoward commented Apr 23, 2019

I have a body of images which I want to segment into seven classes using the utils.PredictionType.MULTILABEL modality for predicting class memberships. I believe that I can do this based on the Use Cases presented in the docs. The only example I have found of dhSegment in use is the demo in the docs, however, which is using the simpler utils.PredictionType.CLASSIFICATON modality.

I would love to look at any and all examples of dhSegment being used in any modality, and in particular in the MULTILABEL modality.

Any and all pointers and assistance will be greatly appreciated.

From googling around, it feels like the user base is somewhat rarified. I hope to add my own application to those testing and applying dhSegment.

Thank you!

@monuminu
Copy link

I am also looking at the same . I want to predict various page segments like Tables , Header , Paragraph , Charts etc . Can you please share some example or pretrained model which we can use .

@solivr
Copy link
Member

solivr commented May 15, 2019

Sorry, we are indeed lacking examples for the MULTILABEL training and I do not have time to publish some at the moment...
The main difference in the MULTILABEL training is the data preparation (there are a few hints on how to prepare your data here), the training itself is almost the same.
This may get you started but feel free to ask if you have other questions

@Ghada-el-fekih
Copy link

I have prepared data for Multilabel classification, and i kept the same training code. So, i am looking for a way to test the obtained model to verify if its working. Can you please help with some hints and examples which we can use .

Thank you!

@Ghada-el-fekih
Copy link

I have a body of images which I want to segment into seven classes using the utils.PredictionType.MULTILABEL modality for predicting class memberships. I believe that I can do this based on the Use Cases presented in the docs. The only example I have found of dhSegment in use is the demo in the docs, however, which is using the simpler utils.PredictionType.CLASSIFICATON modality.

I would love to look at any and all examples of dhSegment being used in any modality, and in particular in the MULTILABEL modality.

Any and all pointers and assistance will be greatly appreciated.

From googling around, it feels like the user base is somewhat rarified. I hope to add my own application to those testing and applying dhSegment.

Thank you!

Hey, i'm working on the same task MULTILABEL classification, so i'm wondering if i have to retrain the models VGG16 and Resnet_v1_50 or should i work with the pretrained model ?

@tralfamadude
Copy link

tralfamadude commented Oct 16, 2020

I am also attempting the multilabel case. I defined an attribute "type" and have 20 variations. None of them overlap in the areas I defined using VGG. The output of via.create_masks() is pretty complex and leaves a big gap to bridge before training.

I generate classes.txt, picking unique RGB colors from a static list for each label/annotation type.

via.create_masks() created 1 or more mask images (png files) in the label dir. The mask images it makes are white on black where white is the labeled area.

I created a script to combine the black and white masks into a color mask.

@tralfamadude
Copy link

I have 20 annotation types for my work at Internet Archive to dissect images of journals, like { cover, footer, header, page_num, references, body, begin_article, ad, editorial, contributors...}. When trying to train, I got this error:

InvalidArgumentError (see above for traceback): Only indices.shape[-1] values between 1 and 7 are currently supported. Requested rank: 20
[[node Label2Img/GatherNd (defined at /home/peb/ws/dhSegment/dh_segment/utils/labels.py:67) ]]

The error arises at: tf.gather_nd(c, tf.cast(class_label_tensor, tf.int32))

Is the multilabel case is limited to 7 maximum? It looks like it depends on tensorflow graph. If so, that should be documented. I have to redo my annotations now.

The reason for having 20 annotation types is that other guidance in the issues here suggests that labeling things you do not want to extract is a good practice.

@Rami6786
Copy link

Sorry, we are indeed lacking examples for the MULTILABEL training and I do not have time to publish some at the moment...
The main difference in the MULTILABEL training is the data preparation (there are a few hints on how to prepare your data here), the training itself is almost the same.
This may get you started but feel free to ask if you have other questions

@solivr Kindly provide manual for multiabel training, it will be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants