pupil-labs / apriltags

Python bindings for the apriltags3 library
https://pupil-apriltags.readthedocs.io/en/latest/index.html
Other
107 stars 30 forks source link

'corrupted size vs. prev_size' error message #39

Open qiyan98 opened 3 years ago

qiyan98 commented 3 years ago

Hi, thanks for your contribution on this apriltag package. But from time to time, I see the corrupted size vs. prev_size error message in the program. It is related to detector.detect(). Is there any suggestions on how to fix it?

aaronleetw commented 1 year ago

Can confirm. I have the same issue after about 5 runs on my RaspberryPi 4B.

/home/pi/uploaded.py:39: size=506 KiB, count=5, average=101 KiB

/home/pi/detection.py:18: size=506 KiB, count=2, average=253 KiB

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:123: size=4628 B, count=38, average=122 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:435: size=2849 B, count=15, average=190 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:260: size=2742 B, count=14, average=196 B

/usr/lib/python3.9/ctypes/__init__.py:392: size=2288 B, count=13, average=176 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:363: size=2149 B, count=14, average=154 B

/usr/lib/python3.9/ctypes/__init__.py:368: size=2056 B, count=11, average=187 B

/usr/lib/python3.9/json/decoder.py:353: size=1649 B, count=23, average=72 B

<unknown>:0: size=1248 B, count=4, average=312 B

/home/pi/uploaded.py:16: size=1112 B, count=1, average=1112 B

/home/pi/uploaded.py:15: size=1018 B, count=10, average=102 B

/home/pi/uploaded.py:41: size=1000 B, count=2, average=500 B

/home/pi/detection.py:24: size=720 B, count=2, average=360 B

/home/pi/detection.py:27: size=704 B, count=2, average=352 B

/usr/local/lib/python3.9/dist-packages/cscore/_logging.py:12: size=592 B, count=2, average=296 B

/usr/lib/python3.9/ctypes/__init__.py:388: size=576 B, count=1, average=576 B

/usr/lib/python3.9/logging/__init__.py:1507: size=488 B, count=1, average=488 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:358: size=472 B, count=1, average=472 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:129: size=472 B, count=1, average=472 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:125: size=448 B, count=1, average=448 B

/usr/lib/python3.9/ctypes/__init__.py:387: size=440 B, count=1, average=440 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:347: size=440 B, count=1, average=440 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:438: size=432 B, count=1, average=432 B

/home/pi/uploaded.py:45: size=424 B, count=1, average=424 B

/usr/lib/python3.9/logging/__init__.py:1701: size=408 B, count=1, average=408 B

/usr/lib/python3.9/logging/__init__.py:1697: size=400 B, count=1, average=400 B

/usr/lib/python3.9/logging/__init__.py:1409: size=376 B, count=2, average=188 B

/usr/lib/python3.9/ctypes/__init__.py:394: size=360 B, count=9, average=40 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:222: size=232 B, count=2, average=116 B

/usr/lib/python3.9/logging/__init__.py:1700: size=168 B, count=1, average=168 B

/usr/lib/python3.9/posixpath.py:88: size=122 B, count=1, average=122 B

/home/pi/uploaded.py:28: size=104 B, count=2, average=52 B

/home/pi/uploaded.py:25: size=104 B, count=2, average=52 B

/home/pi/uploaded.py:22: size=102 B, count=2, average=51 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:442: size=88 B, count=2, average=44 B

/home/pi/uploaded.py:31: size=72 B, count=2, average=36 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:265: size=64 B, count=1, average=64 B

/usr/lib/python3.9/logging/__init__.py:1306: size=48 B, count=1, average=48 B

/home/pi/uploaded.py:37: size=48 B, count=1, average=48 B

/home/pi/uploaded.py:32: size=48 B, count=1, average=48 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:348: size=48 B, count=1, average=48 B

/home/pi/.local/lib/python3.9/site-packages/dt_apriltags/apriltags.py:247: size=48 B, count=1, average=48 B

/usr/lib/python3.9/codecs.py:268: size=40 B, count=1, average=40 B

/home/pi/uploaded.py:44: size=34 B, count=1, average=34 B

/home/pi/.local/lib/python3.9/site-packages/numpy/ctypeslib.py:526: size=32 B, count=1, average=32 B

/usr/lib/python3.9/ctypes/__init__.py:374: size=28 B, count=1, average=28 B

corrupted size vs. prev_size
aaronleetw commented 1 year ago

I fixed it by switching to the apriltag package on pip: https://pypi.org/project/apriltag/. It is based on (but not endorsed by) the AprilTags fork from SwatRobotics: https://github.com/swatbotics/apriltag.