AFeiV8 / XM-YOLOViT

MIT License
8 stars 1 forks source link

VisDrone hazy images #2

Open BehdadSDP opened 7 months ago

BehdadSDP commented 7 months ago

hi, could you please share the hazy images for downloading? it seems for generating these hazy images needs high memory RAM that my device doesn't support it. many thanks

AFeiV8 commented 7 months ago

hi, could you please share the hazy images for downloading? it seems for generating these hazy images needs high memory RAM that my device doesn't support it. many thanks

I apologize very much, I have deleted the image data due to lack of memory on my personal computer. However, you could try separating the code into two parts, atmospheric light values and foggy day image generation. To use it, you first get the atmospheric light values from the sampled dataset and then do the image generation. In my previous experiments, the image generation could be done using only the CPU and the memory footprint was not too high, but it may take some time, I generated one image in about 3.6 seconds. Or you can try using GPU accelerated Opencv.

BehdadSDP commented 7 months ago

the problem is about first loop: for i in img_path: img = Image.open(os.path.join(sampled_path, i)) transform = transforms.Compose([transforms.Resize([1080, 1920]), transforms.ToTensor()]) img = transform(img) imgs.append(img) imgs = torch.stack(imgs, dim=0).to(device) the img list needs high memory RAM. after this atmospheric light will calculate. how can I handle this? many thanks.

AFeiV8 commented 7 months ago

the problem is about first loop: for i in img_path: img = Image.open(os.path.join(sampled_path, i)) transform = transforms.Compose([transforms.Resize([1080, 1920]), transforms.ToTensor()]) img = transform(img) imgs.append(img) imgs = torch.stack(imgs, dim=0).to(device) the img list needs high memory RAM. after this atmospheric light will calculate. how can I handle this? many thanks.

Would it be possible to try to reduce the resolution of the real foggy day images, or use smaller sizes in transforms.Resize, or do the sampling of atmospheric light values in batches to reduce the number of images in a single input. These are the ones I can think of at the moment.

AFeiV8 commented 7 months ago

the problem is about first loop: for i in img_path: img = Image.open(os.path.join(sampled_path, i)) transform = transforms.Compose([transforms.Resize([1080, 1920]), transforms.ToTensor()]) img = transform(img) imgs.append(img) imgs = torch.stack(imgs, dim=0).to(device) the img list needs high memory RAM. after this atmospheric light will calculate. how can I handle this? many thanks.

I don't know if you sampled the atmospheric light values and applied them to the VisDrone dataset only.If so, you might want to try the data given in my paper, you can see the general effect in the images shown in the paper's.

BehdadSDP commented 7 months ago

thank you very much