rasmushaugaard / surfemb

SurfEmb (CVPR 2022)
https://surfemb.github.io/
MIT License
77 stars 17 forks source link

Question about inference data #23

Closed meropis closed 2 years ago

meropis commented 2 years ago

For some strange reason wget does not download data to the correct place on my machine, so I downloaded the inference_data.zip file manually. I am now unsure where to extract its contents? Would I do this in the root directory or perhaps in /data or /data/models. Thank you.

LeroyChou commented 2 years ago

Do it in root directory and it will generates three folders(detection_results, surface_samples, surface_samples_normals) in data/.

meropis commented 2 years ago

Ahh, thank you. So my data/ folder should have 5 folders in it total: (bop, detection_results, models, surface_examples and surface_samples_normals). My data/models folder is empty other than a .gitkeep file, is this an issue?

For Inference inspection: $ python -m surfemb.scripts.infer_debug [model_path] --device [device], is the [model_path] the filepath to a .ply file within the chosen dataset? e.g. surfemb/data/bop/ycbv_models/models/obj000001.ply for YCB-V (YCB-Video)?

Sorry about all the questions, I'm fairly new in this. I really appreciate your help.

LeroyChou commented 2 years ago

data/models stores weights of the network, you could download it in releases of this repo or obtain it by training the network. model_path is path of the model.

meropis commented 2 years ago

Thank you for your answers, I really appreciate them :smile:

meropis commented 2 years ago

I think I'm doing something wrong. When I run my command to test the inference inspection I get a UnpicklingError: unpickling stack underflow.

This is the full command I run: python -m surfemb.scripts.infer_debug surfemb/data/bop/ycbv_models/models/obj_000001.ply --device cuda

Am I pointing the model_path towards the correct location?

LeroyChou commented 2 years ago

Sorry, I might mislead you. model_path is the path of the weights not the model of dataset.so your command should be like this python3 -m surfemb.scripts.infer_debug blabla/ycbv-jwpvdij1.compact.ckpt --device cuda:0

meropis commented 2 years ago

Ahhh, so my model_path leads towards the folder that contains detection_results, surface_samples and surface_samples_normals?

LeroyChou commented 2 years ago

No, it leads towards to the weights just downloaded from releases.

Ahhh, so my model_path leads towards the folder that contains detection_results, surface_samples and surface_samples_normals?

meropis commented 2 years ago

OHHH! thank you, I will come back with an update asap

Update: this worked!