AtributeError: 'tuple' object has no attribute 'astype'

Hello,

When got TX2 module, installed all software via jetpack, and apt-get install python-opencv, i checked the python-opncv version is 2.4.9, and complied py-faster-rcnn successfully, and I change tool/demo.py:

capture = cv2.VideoCapture(1)
ret, im = capture.read()
im_detect(net, im)
then got this problem as below message:

GHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
The camera found!

Traceback (most recent call last):
File “demo_video.py”, line 195, in
object_im=demo(net, im)
File “demo_video.py”, line 74, in demo
scores, boxes = im_detect(net, im)
File “/mnt/Develop/ObjectRecognization/py-faster-rcnn/tools/…/lib/fast_rcnn/test.py”, line 121, in im_detect
blobs, im_scales = _get_blobs(im, boxes)
File “/mnt/Develop/ObjectRecognization/py-faster-rcnn/tools/…/lib/fast_rcnn/test.py”, line 103, in _get_blobs
blobs[‘data’], im_scale_factors = _get_image_blob(im)
File “/mnt/Develop/ObjectRecognization/py-faster-rcnn/tools/…/lib/fast_rcnn/test.py”, line 33, in _get_image_blob
im_orig = im.astype(np.float32, copy=True)
AttributeError: ‘tuple’ object has no attribute ‘astype’

Is somebody can help me?

Albert

Hi,

May I know more about your environment?

  1. OS with Jetpack3.0
  2. Opencv4Tegra-2.4.13?
  3. python2.7?

right?

Hi xhz,

Have you clarified the cause?
Or please provide those information then we can help.

Thanks