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

TypeError #6

Open
punnpkin opened this issue Sep 6, 2019 · 1 comment
Open

TypeError #6

punnpkin opened this issue Sep 6, 2019 · 1 comment

Comments

@punnpkin
Copy link

punnpkin commented Sep 6, 2019

Traceback (most recent call last):
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/mask_rcnn_node", line 186, in
main()
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/mask_rcnn_node", line 182, in main
node.run()
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/mask_rcnn_node", line 99, in run
results = self._model.detect([np_image], verbose=0)
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/model.py", line 2333, in detect
molded_images, image_metas, windows = self.mold_inputs(images)
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/model.py", line 2236, in mold_inputs
padding=self.config.IMAGE_PADDING)
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/utils.py", line 402, in resize_image
image, (round(h * scale), round(w * scale)))
File "/home/giga/.local/lib/python2.7/site-packages/scipy/misc/pilutil.py", line 490, in imresize
imnew = im.resize(size, resample=func[interp])
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1538, in resize
return self._new(self.im.resize(size, resample))
TypeError: integer argument expected, got float

@THOSE-EYES
Copy link

THOSE-EYES commented Sep 13, 2020

Traceback (most recent call last):
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/mask_rcnn_node", line 186, in
main()
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/mask_rcnn_node", line 182, in main
node.run()
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/mask_rcnn_node", line 99, in run
results = self._model.detect([np_image], verbose=0)
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/model.py", line 2333, in detect
molded_images, image_metas, windows = self.mold_inputs(images)
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/model.py", line 2236, in mold_inputs
padding=self.config.IMAGE_PADDING)
File "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/utils.py", line 402, in resize_image
image, (round(h * scale), round(w * scale)))
File "/home/giga/.local/lib/python2.7/site-packages/scipy/misc/pilutil.py", line 490, in imresize
imnew = im.resize(size, resample=func[interp])
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1538, in resize
return self._new(self.im.resize(size, resample))
TypeError: integer argument expected, got float

@punnpkin, in your file "/home/giga/catkin_ws/src/mask_rcnn_ros/nodes/utils.py" change
scale = max_dim / image_max to scale = (max_dim*1.0) / image_max

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

No branches or pull requests

2 participants