HorizonNet icon indicating copy to clipboard operation
HorizonNet copied to clipboard

Finetuned model

Open glacierwl opened this issue 6 years ago • 7 comments

Hello,when training, in order to get the finetuned model, what's the meaning of "Finetuned on finetune_general/ 66 images"? I just want to know the process of training and validation,can you help me? Thank you!

glacierwl avatar Aug 12 '19 08:08 glacierwl

Hi, below are some examples. Training cuboid layout:

python train.py --train_root_dir data/layoutnet_dataset/train/ --valid_root_dir data/layoutnet_dataset/valid/ --batch_size_train 4 --num_workers 4 --backbone resnet50 --id resnet50_rnn

Inferring on testing images and dump to ./tmp directory:

python inference.py --pth ckpt/resnet50_rnn/best_valid.pth --img_glob "data/layoutnet_dataset/test/img/*png" --output_dir tmp

Finally, quantitatively eval the performance

python eval_cuboid.py --dt_glob "tmp/*" --gt_glob "data/layoutnet_dataset/test/label_cor/*"

sunset1995 avatar Aug 12 '19 08:08 sunset1995

Actually,I want to know the process of training general layout(not cuboid layout),because I have no idea about how to get the general room pretrained model.

glacierwl avatar Aug 12 '19 11:08 glacierwl

@sunset1995

glacierwl avatar Aug 12 '19 11:08 glacierwl

For general manhattan layout:

  • Make sure your dataset is properly annotated as general layout
    • you can use dataset.py to visualize and check the ground truth general layout (f.e. python dataset.py --root_dir data/layoutnet_dataset/finetune_general/ --ith -1 --out_dir /tmp/asdf and visually check the images in /tmp/asdf)
  • No extra argument with train.py
  • Add --relax_cuboid with inference.py
  • Use eval_general.py instead of the original eval_cuboid.py

sunset1995 avatar Aug 12 '19 12:08 sunset1995

I'm going to use Structured3D dataset with my sparse time this week. Maybe you can see whether your questions are solved then ;)

sunset1995 avatar Aug 12 '19 12:08 sunset1995

Thank you for your reply! I am interested in your work :) :) Now the last question about general layout: The difference about command when training cuboid layout: python train.py --id resnet50_rnn general layout: ??? (No extra argument with train.py) According to my observation about directory: HorizonNet/ |--data/ | |--finetune_general/ | |--test/ | |--train/ | |--valid/ But I can't find the code about "finetune_general directory" :( What's the meaning about the instruction? General room pretrained model : Trained on train/ 817 pano images first Finetuned on finetune_general/ 66 images i.e. How to finetuned on finetune_general/66 images? (I have got the annotation about general layout, and I am stuck in the next step)

glacierwl avatar Aug 13 '19 02:08 glacierwl

Thank you for your reply! I am interested in your work :) :) Now the last question about general layout: The difference about command when training cuboid layout: python train.py --id resnet50_rnn general layout: ??? (No extra argument with train.py) According to my observation about directory: HorizonNet/ |--data/ | |--finetune_general/ | |--test/ | |--train/ | |--valid/ But I can't find the code about "finetune_general directory" :( What's the meaning about the instruction? General room pretrained model : Trained on train/ 817 pano images first Finetuned on finetune_general/ 66 images i.e. How to finetuned on finetune_general/66 images? (I have got the annotation about general layout, and I am stuck in the next step)

Hi @glacierwl Do you know how to use finetune_general/ 66 images for training?

adalinadalin avatar May 19 '23 01:05 adalinadalin