ERRNet icon indicating copy to clipboard operation
ERRNet copied to clipboard

Hard to put dataset in the right place for just a test.

Open aragorn1025 opened this issue 4 years ago • 5 comments

Is there any hint for put dataset in the right place for at least a test?

aragorn1025 avatar Jul 31 '19 07:07 aragorn1025

@Vandermode @aragorn1025 What should I do for testing only one image? Can you provide an example for inference ? Anticipate for your reply.

MenSanYan avatar Aug 15 '19 07:08 MenSanYan

Hi @MenSanYan, I was also trying to test for one single image. I did the following to get the results.

  • Created a folder, placed my testing image inside that directory
  • Commented all code related to the creation of dataset and data loader
  • Created my dataset for example, test_ref_dataset = datasets.RealDataset('/home/aditya/project/ERRNet/test_ref/')
  • Created a dataloader for the same
  • test_ref_dataloader = datasets.DataLoader( test_ref_dataset, batch_size=8, shuffle=False, num_workers=opt.nThreads, pin_memory=True)
  • res = engine.test(test_ref_dataloader, savedir=result_dir) After this, I was able to get for a single image in the results directory.

97k avatar Aug 21 '19 15:08 97k

Can we use this network for commercial purpose for a small project, as a part of an image processing processes.

To inference on raw samples. In test_errnet.py, right after line 17, commented rest of the part. And put below code

engine = Engine(opt)
test_ref_dataset = datasets.RealDataset('/content/my_img/') # where you save your image

test_ref_dataloader = datasets.DataLoader(
                    test_ref_dataset, batch_size=8, shuffle=False,
                    num_workers=opt.nThreads, pin_memory=True)

res = engine.test(test_ref_dataloader, savedir="/content/") # where result would be saved 

innat avatar Apr 04 '21 07:04 innat

Can i use the code without ubuntu?

WGHao avatar Mar 20 '22 08:03 WGHao