AlonzoLeeeooo / SketchRefiner

The official code implementation of "Towards Interactive Image Inpainting via Sketch Refinement".
https://ieeexplore.ieee.org/abstract/document/10533842
35 stars 1 forks source link

edges_prefix #4

Closed LQ971225 closed 11 months ago

LQ971225 commented 1 year ago

Hello, I'm very interested in this article, it's a very good article. Could you please tell me how "edges_prefix" was generated and what it generates?

AlonzoLeeeooo commented 1 year ago

Hi @LQ971225 ,

Thank you for your attention of our work! The edges_prefix represents the path of folder that stores detected edge maps from ground truth images, and we use bdcn as the edge detector. To execute the code, you need to prepare the edge maps before training. Hope our answer addresses your problem.

Best,

LQ971225 commented 1 year ago

Thank you for your prompt reply. Can I understand that I need to run the BDCN code, and after running it, it will generate a file with the name "edges_prefix"?

AlonzoLeeeooo commented 1 year ago

Thank you for your prompt reply. Can I understand that I need to run the BDCN code, and after running it, it will generate a file with the name "edges_prefix"?

The edges_prefix is a parameter you need to configure when you are executing the python file, e.g., python SRN_train.py --edges_prefix edge_path. Here are some recommended data preparation procedures, you may refer to them:

  1. Download the image dataset. Assume that the images are saved at ./images.
  2. Execute the BDCN edge detector code. Assume your saved edge maps are located at ./edges. Make sure that the detected edge map shares the same filename as its corresponding ground truth image.
  3. When execute the python file, configure the edges_prefix parameter. An example command line may be: python SRN_train.py --edges_prefix ./edges.
LQ971225 commented 1 year ago

Hello, I've been running your provided "BDCN" code in the past few days and encountered a couple of issues. Can you please assist me with these? I would greatly appreciate it! Here are the two questions:

  1. When running the code, I encounter the error message: "No such file or directory 'params/bdcn_final.pth'." How can I resolve this issue?

  2. In the "test.py" file, there's a line "test_root = cfg.config_test[args.dataset]['data_root']." What kind of image path should I put here?

I didn't reach out to the author of "BDCN" because they haven't provided answers to these questions. Thank you for your help!

LQ971225 commented 1 year ago

Hi @AlonzoLeeeooo Sorry to bother you again. I really need your help. Can you please help me answer the above two questions? I would truly appreciate your assistance!

AlonzoLeeeooo commented 1 year ago

Hello, I've been running your provided "BDCN" code in the past few days and encountered a couple of issues. Can you please assist me with these? I would greatly appreciate it! Here are the two questions:

  1. When running the code, I encounter the error message: "No such file or directory 'params/bdcn_final.pth'." How can I resolve this issue?
  2. In the "test.py" file, there's a line "test_root = cfg.config_test[args.dataset]['data_root']." What kind of image path should I put here?

I didn't reach out to the author of "BDCN" because they haven't provided answers to these questions. Thank you for your help!

Sorry for the late response. Hope the following answers still help you.

  1. The error message shows that you need to put the pre-trained model weights of BDCN in the suggested directory params/bdcn_final.pth. You may refer to the repository of BDCN to download their model weights.
  2. I remember that the --data_root configuration of the BDCN code refers to the path that stores all your images, you may give it a shot. Please forgive if I have figure this wrong.

If you have any further question, please feel free to ask us here. Best,

SHIJILIANG01 commented 5 months ago

Hello, did you run the BDCN code successfully?

AlonzoLeeeooo commented 5 months ago

Hello, did you run the BDCN code successfully?

Hi @SHIJILIANG01 and @LQ971225 ,

Thank you for your interests in our work! We are sorry that we haven't yet updated the code and documents of SketchRefiner due to busy schedule. Code, dataset, model weights, documents will be soon updated and refined. We will notice you as soon as everything is ready.

As for the use of BDCN, you can refer to another work of ours in this repo, which also uses BDCN for data pre-processing. We offer detailed instructions in this document and pre-trained model weights of BDCN in our Huggingface repo.

Please do not hesitate to contact us if you have any further questions of our work.

Best regards