TRI-ML / vidar

Other
563 stars 67 forks source link

How to do inference on single image or folder using checkpoints of the model? #26

Open akashchavan15 opened 2 years ago

akashchavan15 commented 2 years ago

This is great work. I trained the model using this repo for my use case. Is there a way to do inference on a single image or folder using the checkpoints of the model?

Thank you

akashchavan15 commented 2 years ago

This is great work. I trained the model using this repo for my use case. Is there a way to do inference on a single image or folder using the checkpoints of the model?

Thank you

can someone please reply to my query?

Northengard commented 2 years ago

Hello, @akashchavan15 I've recently found this repo and desided to check some pretrained models. As far as I know there is no inference script, except demo script.

I wrote an inference script based on demo, but it seems to be a little inappropriate in "vidar-like paradygm", because all provided snapshots (for some models) are not adapted to use outside "Wrapper", their names does not match at the first place, like some snapshots had been created in another pipeline version. Had to fix it.

It seems Wrapper modification or wrapper's analog to infer the model at any data are required

akashchavan15 commented 2 years ago

Hi @Northengard Thanks for the reply. I am also trying to create one but facing some issues. I was hoping someone from the contributors would give some inside.

1005452649 commented 1 year ago

hello,can I have a look at your code? @Northengard

Northengard commented 1 year ago

Hello, @1005452649, sorry for delay, shure. https://pastebin.com/bwzNdTNm It contains 2 types of model initialization that I've tested:

  1. setup_arch
  2. via gettatr + load checkpoint.

Methods works different. For the second one "load_checkpoint" method modification could be required. (like that https://pastebin.com/n6kWfgBp)