DeGirum / degirum_tools

Utilities for use with PySDK
MIT License
3 stars 0 forks source link

Stack images #38

Closed lsutardja closed 5 months ago

lsutardja commented 5 months ago

Fix cornerposition logic in put_text. Now corner_xy works relative to the cornerposition.

Add stack_images, useful for comparing two images, e.g. original image vs depth map or original image vs style transfer. Right now the label functionality is fixed. Would it be worth it to give the user more control on the label text (position, size, etc)? I picked bottom_left because currently FPS is default set to top_left.

lsutardja commented 5 months ago

@vlad-nn

The PR is not passing mypy check on a file I did not modify at all, zone_count.py. Previously, this file passed the type check on an earlier commit.

If you compare the two gh action runs, it seems that these packages are different from the two runs:

certifi-2024.6.2 opencv-python-4.10.0.82 types-requests-2.32.0.20240602 typing-extensions-4.12.1

I updated these packages locally and cannot recreate the same mypy errors.

vlad-nn commented 5 months ago

I updated these packages locally and cannot recreate the same mypy errors.

Well, that's obviously not your fault. But we need to do something.

Proposition 1: try to convert underlying numpy arrays to lists like: cv2.fillPoly(self.mask, [polygon.astype(int).tolist()], color=[1])

Proposition 2: disable warnings like: # type: ignore[list-item]