flowmap icon indicating copy to clipboard operation
flowmap copied to clipboard

OOM

Open StarsTesla opened this issue 1 year ago • 1 comments

Hi, I tried this code on my pc, and I used 400 images, this seems OOM, does this code load all images to GPU and run 400 images in mean time? COLMAP seems not OOM on over 400 images image

StarsTesla avatar May 06 '24 06:05 StarsTesla

I reduce to 200 images, and use 4090, still OOM image

StarsTesla avatar May 06 '24 07:05 StarsTesla

You can try appending +experiment=low_memory to the command you use to run FlowMap. However, FlowMap isn't designed to run on video sequences of many hundreds or thousands of frames. There are probably ways to address this (see #4 and #13 for more details), but we left that for future work.

dcharatan avatar May 06 '24 17:05 dcharatan

You can try appending +experiment=low_memory to the command you use to run FlowMap. However, FlowMap isn't designed to run on video sequences of many hundreds or thousands of frames. There are probably ways to address this (see #4 and #13 for more details), but we left that for future work.

The "image_shape: 10800" in ./config/experiment/low_memory.yaml indicates that the shape of image was cropped to "10800"? What is the specific height and width?

kk6398 avatar May 21 '24 02:05 kk6398

If the image_shape is just one number, it's the approximate total number of pixels (so width times height).

dcharatan avatar May 21 '24 03:05 dcharatan

If the image_shape is just one number, it's the approximate total number of pixels (so width times height).

Yep, for example, the image resolution of mipnerf360_garden scene is 51873316, which the total number of pixels is much larger than 10800. Is it cropped from 51873316 to 10800?

kk6398 avatar May 21 '24 03:05 kk6398

Yes, FlowMap will resize the input images until they're roughly at the target resolution. There are two resolutions that FlowMap uses:

  1. The resolution at which the optimization runs, which is determined by the image_shape parameter. This is a relatively low resolution, since running a CNN on high-resolution images is very expensive.
  2. The resolution at which optical flow and point tracks are calculated, which is generally 16x-25x as large (4x to 5x as large in each dimension, determined by flow_scale_multiplier). High-resolution images are needed for flow and tracks to be accurate.

Once FlowMap has resized the images as determined by image_shape, it will crop them until their width and height are divisible by 32. This is necessary for compatibility with RAFT.

dcharatan avatar May 21 '24 15:05 dcharatan

Yes, FlowMap will resize the input images until they're roughly at the target resolution. There are two resolutions that FlowMap uses:

  1. The resolution at which the optimization runs, which is determined by the image_shape parameter. This is a relatively low resolution, since running a CNN on high-resolution images is very expensive.
  2. The resolution at which optical flow and point tracks are calculated, which is generally 16x-25x as large (4x to 5x as large in each dimension, determined by flow_scale_multiplier). High-resolution images are needed for flow and tracks to be accurate.

Once FlowMap has resized the images as determined by image_shape, it will crop them until their width and height are divisible by 32. This is necessary for compatibility with RAFT.

Hi, ①I take a good look at the code. I discovery that the default image_shape is 43200(180*240) for demo in "overfit.yaml". I wonder whether the resolution is all 43200 at inference process in condition of without using "+experiment=low_memory".

②Besides, the image_shape for co3d/re10k at training stage is default [300,400]. What is the specific resolution of co3d/re10k? And how many memories cost of [300,400]? [300,400] is the experience value that we debug?
Looking forward your reply.

kk6398 avatar Jun 11 '24 14:06 kk6398