Currently, the data loading method, as shown in the following line, may pose a risk of memory leakage:
|
img = np.array(scene[f'image_{view_idx}']) |
When I use a similar approach, i.e., obtaining the handle of the HDF5 file during dataset initialization and loading data iteratively, I noticed that my memory usage keeps increasing. I analyzed that this is because the handle is not closed, causing the data to remain in memory. Using the with statement to load data can resolve this issue.
Currently, the data loading method, as shown in the following line, may pose a risk of memory leakage:
LaRa/dataLoader/gobjverse.py
Line 129 in c32ae77
When I use a similar approach, i.e., obtaining the handle of the HDF5 file during dataset initialization and loading data iteratively, I noticed that my memory usage keeps increasing. I analyzed that this is because the handle is not closed, causing the data to remain in memory. Using the
withstatement to load data can resolve this issue.