TableBank icon indicating copy to clipboard operation
TableBank copied to clipboard

TestPretrainedModel.md detectron2

Open kbrajwani opened this issue 5 years ago • 19 comments

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.

kbrajwani avatar Sep 23 '20 09:09 kbrajwani

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

liminghao1630 avatar Oct 19 '20 07:10 liminghao1630

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 avatar Oct 19 '20 08:10 kbrajwani

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

kbrajwani avatar Oct 26 '20 04:10 kbrajwani

@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.

liminghao1630 avatar Oct 26 '20 06:10 liminghao1630

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

kbrajwani avatar Oct 26 '20 06:10 kbrajwani

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

kbrajwani avatar Oct 26 '20 16:10 kbrajwani

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 avatar Oct 29 '20 02:10 DuckJ

Did you forget to update the estPretrainedModel.md @liminghao1630

DuckJ avatar Oct 29 '20 02:10 DuckJ

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

liminghao1630 avatar Oct 29 '20 02:10 liminghao1630

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

DuckJ avatar Oct 29 '20 02:10 DuckJ

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

liminghao1630 avatar Oct 29 '20 02:10 liminghao1630

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 avatar Oct 29 '20 10:10 DuckJ

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

DuckJ avatar Oct 29 '20 10:10 DuckJ

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

DuckJ avatar Oct 30 '20 02:10 DuckJ

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?

alongadotvatbox avatar Nov 17 '20 15:11 alongadotvatbox

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

raghavnprasad avatar Jan 11 '21 13:01 raghavnprasad

No, just downloaded the dataset and trained from scratch using the pretrained detectron2 modules. Worked well, wasn't too much of a hassle.

On Mon, Jan 11, 2021 at 3:34 PM raghavnprasad [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/doc-analysis/TableBank/issues/26#issuecomment-757953970, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6KEDYMW46JTMWXDGWEW6LSZL45NANCNFSM4RWYWNPQ .

--

Alon Gadot

Machine Learning Engineer

Mobile (IL): +972-52-4829831 Email: [email protected]

alongadotvatbox avatar Jan 11 '21 13:01 alongadotvatbox

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

debparth avatar Apr 23 '21 07:04 debparth

@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.

omrastogi avatar Aug 31 '21 10:08 omrastogi