Closed geekvc closed 7 years ago
I've commit a fix for this issue. It turns out I've forgot to commit the new changes to the data loading file to GitHub.
It should be working now.
PS: You'll have to re-install the Lua/Torch7 API because the error was in there.
$ git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 3), reused 5 (delta 3), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/farrajota/dbcollection
ce05565..e2f8bd6 master -> origin/master
Updating ce05565..e2f8bd6
Fast-forward
APIs/lua/manager.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
$ git pull
remote: Counting objects: 4, done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/farrajota/dbcollection
e2f8bd6..6ee029c master -> origin/master
Updating e2f8bd6..6ee029c
Fast-forward
dbcollection/cache.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
$ luarocks remove dbcollection
and re-install the dbcollection in the folder APIs/lua, the error still occured:
$ th train.lua
==> (1/5) Load options
==> (2/5) Load dataset data loader
==> (3/5) Load roi proposals data
==> (4/5) Setup model:
==> (5/5) Train Fast-RCNN model
/home/wangty/torch/install/bin/luajit: /mnt/geekvc/fastrcnn-example-torch/data.lua:13: attempt to index local 'dbc' (a boolean value)
stack traceback:
/mnt/geekvc/fastrcnn-example-torch/data.lua:13: in function 'get_db_loader'
/mnt/geekvc/fastrcnn-example-torch/data.lua:34: in function 'fetch_loader_dataset'
/mnt/geekvc/fastrcnn-example-torch/data.lua:298: in function 'data_gen'
/home/wangty/torch/install/share/lua/5.1/fastrcnn/train.lua:47: in function 'train'
train.lua:66: in main chunk
[C]: in function 'dofile'
...ngty/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406620
the dbc is a boolean value, and the test is true:
th> dbc = require 'dbcollection.manager'
[0.2005s]
th> dbc
true
the get_db_loader() function dbc.load{} cause the error.
local function get_db_loader(name)
local dbc = require 'dbcollection.manager'
local dbloader
local str = string.lower(name)
if str == 'pascal_voc_2007' then
dbloader = dbc.load{name='pascal_voc_2007', task='detection_d'}
elseif str == 'pascal_voc_2012' then
dbloader = dbc.load{name='pascal_voc_2012', task='detection_d'}
elseif str == 'coco' then
dbloader = dbc.load{name='coco', task='detection_2015_d'}
else
error(('Undefined dataset: %s. Available options: pascal_voc_2007 or coco.'):format(name))
end
return dbloader
end
I've commit a fix earlier for this issue, so just do a git pull
on this repo to fetch the fix for get_db_loader()
method that is wrongly requiring the dbcollection package.
I pulled this repo, there is still an error.
$ th train.lua
==> (1/5) Load options
==> (2/5) Load dataset data loader
==> (3/5) Load roi proposals data
==> (4/5) Setup model:
==> (5/5) Train Fast-RCNN model
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/dbcollection/manager.py", line 46, in download
cache_manager = CacheManager(is_test)
File "/usr/local/lib/python2.7/dist-packages/dbcollection/utils/cache.py", line 26, in __init__
self.setup_paths(is_test)
File "/usr/local/lib/python2.7/dist-packages/dbcollection/utils/cache.py", line 60, in setup_paths
home_dir = os.path.expanduser("~")
AttributeError: 'module' object has no attribute 'path'
/home/wangty/torch/install/bin/luajit: ...gty/torch/install/share/lua/5.1/dbcollection/manager.lua:60: attempt to index a nil value
stack traceback:
...gty/torch/install/share/lua/5.1/dbcollection/manager.lua:60: in function 'exists_task'
...gty/torch/install/share/lua/5.1/dbcollection/manager.lua:147: in function 'load'
/mnt/geekvc/fastrcnn-example-torch/data.lua:13: in function 'get_db_loader'
/mnt/geekvc/fastrcnn-example-torch/data.lua:34: in function 'fetch_loader_dataset'
/mnt/geekvc/fastrcnn-example-torch/data.lua:298: in function 'data_gen'
/home/wangty/torch/install/share/lua/5.1/fastrcnn/train.lua:47: in function 'train'
train.lua:66: in main chunk
[C]: in function 'dofile'
...ngty/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406620
I need to take a closer look at this. I'm guessing the python version is at fault here (I use python 3.5). I'll report to you in a few minutes
Ok, thank you for your attention!
It is quit the problem of my python version.
I used the python pyenv to install the anaconda3-4.1.0 and with the python 3.5 version, it works well, and the command conda install -c farrajota dbcollection
also goes well.
Thank you very much for your help!
You can close this issue.
Glad to see your problem getting solved. Nevertheless tyvm for the input as it seems there's some issues with python 2. I'll continue to investigate and push a fix as soon as possible.
Anything else you might need feel free to ping me
Ok, I'm very appreciate for your help!
I follow the fastrcnn package installation and dataset setup, when I try to train the network, error occured as follows
I tested in the torch TREPL about this command