arrayfire / arrayfire/arrayfire-python

SIFT memory leak

未關閉
#169 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
422
分支
63
PR 合併指標
30 天內沒有已合併 PR

描述

It seems that the SIFT detection leaks memory. Here is the example script I am running.

```python
import arrayfire as af
import time

while True:
im = af.load_image('image.jpg')
feats, desc = af.vision.sift(im)

af.device.device_gc()
af.print_mem_info()
time.sleep(1)
```

I solved part of the leaks in #168. Apparently the features destructor wasn't called, and af_release_features needed to be called explicitly from python.

With this fix the ORB feature detection works without leaks, but SIFT and GLOH still do.

Running pretty much the same methods in C works without a memory leak. So I think there might be another destructor that ought to be called explicitly, just like af_release_features, but I could not figure out where the leak was originated from.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Start by reproducing the supplied loop with af.load_image, af.vision.sift, af.device.device_gc, and af.print_mem_info, then compare its behavior with the C implementation and the ORB result described in the issue. Trace the feature cleanup around af_release_features and the SIFT/GLOH bindings; done means repeated detection no longer shows memory growth.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend, performance
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。