SiamMask icon indicating copy to clipboard operation
SiamMask copied to clipboard

cannot import name 'region'

Open universefall opened this issue 5 years ago • 17 comments

Hello, thanks for sharing your code. I encounted a problem when running 'demo.py'. I did all accoding to the Readme. (siammask) bill@bill-QiTianM4550-N000:~/Documents/SiamMask/experiments/siammask$ python ../../tools/demo.py --resume SiamMask_DAVIS.pth --config config_davis.json Traceback (most recent call last): File "../../tools/demo.py", line 7, in from tools.test import * File "/home/bill/Documents/SiamMask/tools/test.py", line 30, in from utils.pyvotkit.region import vot_overlap, vot_float2str File "/home/bill/Documents/SiamMask/utils/pyvotkit/init.py", line 9, in from . import region ImportError: cannot import name 'region' Then I deleted this project and reinstall it. However it shows again.

universefall avatar Apr 13 '19 03:04 universefall

Run make.sh. Change python to python3 in the script if python is alias for python2.7, or update the alias.

stashvala avatar Apr 15 '19 21:04 stashvala

Run make.sh. Change python to python3 in the script if python is alias for python2.7, or update the alias.

Thanks,I will try.

universefall avatar Apr 16 '19 02:04 universefall

Run make.sh. Change python to python3 in the script if python is alias for python2.7, or update the alias.

Thanks,I will try.

Unfortunately, it run out of my GPU memory, which is 2GB. What's your GPU memory ?

universefall avatar Apr 16 '19 06:04 universefall

I have Nvidia GeForce 950m (laptop) which has 2004MiB and i can run the demo.py with pretrained DAVIS model without any problems. Avg memory usage is around 1200MiB.

I'm using Pytorch 1.0.1, Cuda 10.0, Nvidia-410.104 driver

stashvala avatar Apr 16 '19 19:04 stashvala

I have Nvidia GeForce 950m (laptop) which has 2004MiB and i can run the demo.py with pretrained DAVIS model without any problems. Avg memory usage is around 1200MiB.

I'm using Pytorch 1.0.1, Cuda 10.0, Nvidia-410.104 driver I could run test.py. Anyway, thanks for your help!

universefall avatar Apr 17 '19 10:04 universefall

hello sir,i have met the same trouble with “ImportError: cannot import name 'region'”,did you deal with it?thanks for your looking

zz10001 avatar Apr 18 '19 01:04 zz10001

hello sir,i have met the same trouble with “ImportError: cannot import name 'region'”,did you deal with it?thanks for your looking

yes,you could run make.sh and install all package in the requirements.txt.

universefall avatar Apr 18 '19 09:04 universefall

run make.sh and install all package in the requirements.txt.

yeah,it's really helpful to me ! Much obliged!!

zz10001 avatar Apr 18 '19 11:04 zz10001

Have you encountered the problem '核心已转储' when i run the demo.py with everything installed.I can't fix this problem.And nothing happened when i downloaded the model DAVIS.pth with the command 'wget -q http://www.robots.ox.ac.uk/~qwang/SiamMask_DAVIS.pth',do i have to wait until it comes out with some hint? Thanks@zz10001@universefall

liaotianyu269 avatar Apr 22 '19 06:04 liaotianyu269

Have you encountered the problem '核心已转储' when i run the demo.py with everything installed.I can't fix this problem.And nothing happened when i downloaded the model DAVIS.pth with the command 'wget -q http://www.robots.ox.ac.uk/~qwang/SiamMask_DAVIS.pth',do i have to wait until it comes out with some hint? Thanks@zz10001@universefall

我觉得你可以试试不用那个命令下那两个SiamMask model,可以直接下下来放到SiamMask/experiments/siammask文件夹下。

zz10001 avatar Apr 22 '19 11:04 zz10001

run make.sh and install all package in the requirements.txt.

yeah,it's really helpful to me ! Much obliged!!

You're welcome, bro.

universefall avatar Apr 25 '19 06:04 universefall

当我运行所有安装的demo.py时,你遇到过'核心已转储'的问题。我无法解决这个问题。当我用命令'wget -q http下载模型DAVIS.pth时没有任何反应: //www.robots.ox.ac.uk/~qwang/SiamMask_DAVIS.pth',我必须等到它出现一些提示?感谢@ zz10001 @ universefall

我觉得你可以试试不用那个命令下那两个SiamMask模型,可以直接下下来放到SiamMask / experiments / siammask文件夹下。

你好 我也遇到了这个问题 但我是个新手 请问怎么运行 make.sh呀

eathongdoubin avatar Aug 09 '19 17:08 eathongdoubin

你好 我也遇到了这个问题 但我是个新手 请问怎么运行 make.sh呀

重新从配置环境开始一步步按步骤,应该没什么问题吧

zz10001 avatar Aug 11 '19 01:08 zz10001

你好 我也遇到了这个问题 但我是个新手 请问怎么运行 make.sh呀

重新从配置环境开始一步步按步骤,应该没什么问题吧

谢谢你 我快搞好啦

eathongdoubin avatar Aug 11 '19 16:08 eathongdoubin

Hi! I met the same problem and I tried running make.sh and install all the content in requirements.txt. Still I get the same error message cannot import name 'region'. What should I do now?

Joy-X6 avatar Dec 18 '21 04:12 Joy-X6

For anyone else getting this issue - I went from Python version 3.7 to Python verison 3.6 and it fixed the error.

outfielder avatar Feb 20 '22 11:02 outfielder

Run make.sh. Change python to python3 in the script if python is alias for python2.7, or update the alias.

I cant run a make.sh so I use each scripts in this file to cmd and complete to build but the problem isnt fixed

TuanBao0711 avatar Oct 27 '23 02:10 TuanBao0711