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

TestPretrainedModel.md detectron2 #26

Open
kbrajwani opened this issue Sep 23, 2020 · 19 comments
Open

TestPretrainedModel.md detectron2 #26

kbrajwani opened this issue Sep 23, 2020 · 19 comments

Comments

@kbrajwani
Copy link

please make TestPretrainedModel.md as per detectron2 and i think you have upload the weights of detectron2 with detectron1 config. correct me if i am worng.

@liminghao1630
Copy link
Collaborator

Please refer to the detectron2 for inferring instructions. Which config do you think is detecton's?

@kbrajwani
Copy link
Author

kbrajwani commented Oct 19, 2020

Hi thanks for reply
Actually i am not friendlier with detectron so it can be wrong.

when i use you config All_X101.yaml and its load model from bucket it gives result.
cfg = get_cfg()
cfg.merge_from_file("/content/All_X101.yaml")
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # set threshold for this model
predictor = DefaultPredictor(cfg)
outputs = predictor(im)

but when i use you config All_X101.yaml with model_final.pth its not gives any result.
cfg = get_cfg()
cfg.merge_from_file("/content/All_X101.yaml")
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # set threshold for this model
cfg.MODEL.WEIGHTS = "/content/model_final.pth"
predictor = DefaultPredictor(cfg)
outputs = predictor(im)

@kbrajwani
Copy link
Author

i am running following notebook you can check results.
https://colab.research.google.com/drive/1xeOQ5IUpwjDmCU6orwHd2hP3coOaau1t?usp=sharing

@liminghao1630
Copy link
Collaborator

@kbrajwani
Here is a copy of your notebook, which I modified to work well.
https://colab.research.google.com/drive/1lmcdDNHjEia9l1-3SA4iTXAS1hF1_6X2?usp=sharing
I notice that you comment the line "cfg.MODEL.WEIGHTS = '/content/model_final.pth'" which will make the predictor use the ImageNetPretrained model instead of our fine-tuned model. The ImageNetPretrained model has no knowledge about table detection.

@kbrajwani
Copy link
Author

Thanks @liminghao1630 now i want to do table Recognition. so how can i use pretrained model.

@kbrajwani
Copy link
Author

i read you have trained using OpenNMT. so can you please create readme about inference.

@DuckJ
Copy link

DuckJ commented Oct 29, 2020

can you tell me detectron or detectron2 should be installed? According to the TestPretrainedModel.md, detectron should be installed, but the model provided from detectron2.

@DuckJ
Copy link

DuckJ commented Oct 29, 2020

Did you forget to update the estPretrainedModel.md @liminghao1630

@liminghao1630
Copy link
Collaborator

@DuckJ We have no plan to update the TestPretrainedModel.md for now, please refer to the detectron2 for inferring instructions.

@DuckJ
Copy link

DuckJ commented Oct 29, 2020

@liminghao1630 .OK,Thanks, That's means I should install detectron2. right?
TestPretrainedModel.md mislead me, I think you should add some information in it

@liminghao1630
Copy link
Collaborator

@DuckJ Thanks for your suggestions. I have updated the TestPretrainedModel.md and add a reminder.

@DuckJ
Copy link

DuckJ commented Oct 29, 2020

The detect model unzip error? should I use other tools?
Archive: data.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central dire

@DuckJ
Copy link

DuckJ commented Oct 29, 2020

@kbrajwani hi, which tools did you use to unzip the model.zip. I used the unzip and 7-zip, always failed

@DuckJ
Copy link

DuckJ commented Oct 30, 2020

I I solved this problem by downloading each file separately. Thanks

@alongadotvatbox
Copy link

Hey @liminghao1630 , I'd like to run your pretrained models using the colab notebook you've modified for this issue:
https://colab.research.google.com/drive/1lmcdDNHjEia9l1-3SA4iTXAS1hF1_6X2?usp=sharing
It seems to fail on:
predictor = DefaultPredictor(cfg)
Due to
UnpicklingError: invalid load key, '\x0d'.
Would you perhaps know why & how to correct this behavior?

@raghavnprasad
Copy link

@alongadotvatbox did u find a solution for UnpicklingError: invalid load key, '\x0d'. ?

@alongadotvatbox
Copy link

alongadotvatbox commented Jan 11, 2021 via email

@debparth
Copy link

@alongadotvatbox If you don't mind then can you share the recognition model here?

@omrastogi
Copy link

omrastogi commented Aug 31, 2021

@alongadotvatbox did u find a solution for UnpicklingError: invalid load key, '\x0d'. ?

The curl request is wrong and the downloaded file is wrongly uploaded. Where file size should've been more than 700MB, it was just 147KB. So something wrong there.

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

7 participants