Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in PaddleOCR #2

Closed
wants to merge 1 commit into from
Closed

Fix memory leak in PaddleOCR #2

wants to merge 1 commit into from

Conversation

GreatV
Copy link
Owner

@GreatV GreatV commented Oct 29, 2024

Address memory leak issues in multiple files.

  • benchmark/PaddleOCR_DBNet/tools/infer.py

    • Add cleanup of warmup iterations to prevent memory leaks.
  • deploy/cpp_infer/src/ocr_det.cpp

    • Clear large vectors in Run method to prevent memory leaks.
  • deploy/cpp_infer/src/ocr_rec.cpp

    • Clear large vectors in Run method to prevent memory leaks.
  • deploy/cpp_infer/src/paddleocr.cpp

    • Properly delete objects in ocr method to prevent memory leaks.
    • Optimize memory usage in det and rec methods.
  • tools/infer/utility.py

    • Add cleanup of multiple predictor creations to prevent memory leaks.

For more details, open the Copilot Workspace session.

Address memory leak issues in multiple files.

* **benchmark/PaddleOCR_DBNet/tools/infer.py**
  - Add cleanup of warmup iterations to prevent memory leaks.

* **deploy/cpp_infer/src/ocr_det.cpp**
  - Clear large vectors in `Run` method to prevent memory leaks.

* **deploy/cpp_infer/src/ocr_rec.cpp**
  - Clear large vectors in `Run` method to prevent memory leaks.

* **deploy/cpp_infer/src/paddleocr.cpp**
  - Properly delete objects in `ocr` method to prevent memory leaks.
  - Optimize memory usage in `det` and `rec` methods.

* **tools/infer/utility.py**
  - Add cleanup of multiple predictor creations to prevent memory leaks.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/GreatV/PaddleOCR?shareId=XXXX-XXXX-XXXX-XXXX).
@GreatV GreatV closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant