pysot
pysot copied to clipboard
Weakness: duplicated path concatenation in the toolkit/dataset/vot.py
As the title describes, there exists two times path concatenations for the member variable named img_names
belonged to the VOTVideo
class.
One of them occurs at line 18
in toolkit/dataset/video.py
, and the other one is at line 53
in toolkit/dataset/vot.py
if the variable load_img
is set to False
.
Here are some examples.
absolute path
>>> a = '/home/username/test_dir'
>>> b = '/home/username/test_dir/test.py'
>>> c = os.path.join(a, b)
>>> print(c)
/home/username/test_dir/test.py # valid path
relative path
>>> a = './test_dir'
>>> b = './test_dir/test.py'
>>> c = os.path.join(a, b)
>>> print(c)
./test_dir/./test_dir/test.py # invalid path
Consequently, if users pass a relative path to the toolkit.datasets.DatasetFactory.create_dataset
method, their programs will crash. So, please fix this weakness timely.
Thanks for pointing out You are more than welcome to fix it and submit a pull request
Hi, I have a fix for this, but somehow don't have permission to open a PR. Are you guys still accepting contributions?
Hi, I have a fix for this, but somehow don't have permission to open a PR. Are you guys still accepting contributions?
Of course we are accepting contributions, could you please share the error message?
Yup, when I push my PR I get the following message: "remote: Permission to STVIR/pysot.git denied to VishiNehra. fatal: unable to access 'https://github.com/STVIR/pysot/': The requested URL returned error: 403" Also, when I tried to make manually make a PR on github as a workaround, the "Create Pull Request" button was greyed out for me
Yup, when I push my PR I get the following message: "remote: Permission to STVIR/pysot.git denied to VishiNehra. fatal: unable to access 'https://github.com/STVIR/pysot/': The requested URL returned error: 403" Also, when I tried to make manually make a PR on github as a workaround, the "Create Pull Request" button was greyed out for me
You should fork this repo first, which should appear as https://github.com/VishiNehra/pysot/
, then, you should push your changes to that repo, and finally submit a pull request from your forked repo
Oops, totally forgot about forking the repo, thanks!
Hi, Is this issue closed or rather it is open?. If open, shall I take it up?. Thanks
When I test on UAV123 after "cd experiments/siamrpn_r50_l234_dwxcorr",
x == "group1/001333.jpg"
os.path.abspath(x) == "~/pysot/experiments/siamrpn_r50_l234_dwxcorr/group1/001333.jpg"
However, the converted x should be
"~/pysot/testing_dataset/UAV123/group1/001333.jpg"
In this situation, the code should be
self.img_names = [os.path.join(root, x) for x in img_names]
The "img_names" should be relative path starting from "root".
@ZhiyuanChen There is a PR merged for this issue. Is this issue closed? If not, I would like to contribute