Closed IaroslavS closed 2 years ago
Hi,
Thanks for reporting this error. Unfortunately I am unable to reproduce this error. I have to do some slight differences though :
1) dataset I don not have the dataset of you example, so I am using one of the repo:
dataset_path = REPO_ROOT_PATH + 'dataset/symphony/mapping'
2) docker run invocation
docker run -it --rm --runtime=nvidia -p 8888:8888 kapture/kapture
No need for mount nor privilges Make sure port mapping comes before image name, and you have the latest version of docker image :
docker pull kapture/kapture:latest
3) handler exists:
import sys
REPO_ROOT_PATH = '/opt/src/kapture/'
sys.path.insert(0, REPO_ROOT_PATH)
import kapture
import kapture.io.csv as csv
dataset_path = REPO_ROOT_PATH + 'dataset/symphony/mapping'
tar_handlers = csv.get_all_tar_handlers(dataset_path)
print(tar_handlers)
outputs:
<kapture.io.tar.TarCollection object at 0x7f7aa0416e10>
Maybe the bug is related to your specific dataset. Can you send it ?
Maybe the bug is related to your specific dataset. Can you send it ?
I've downloaded some parts of dataset "Gangnam Station and Hyundai Department Store Datasets" (https://www.visuallocalization.net/datasets/). I created folder "NAVER_Labs" and put downloaded "GangnamStation_B1_release_mapping.tar.gz" and "HyundaiDepartmentStore_1F_release_mapping.tar.gz" there. Then I tried to call tar_handlers = csv.get_all_tar_handlers(dataset_path) when dataset_path is a folder to "NAVER_Labs".
I realised my mistake, I should have downloaded this dataset via kapture, not manually.
Manual download should work as well. Is it possible that you did not uncompress 'GangnamStation_B1_release_mapping.tar.gz' before calling the function?
The kapture downloader will automatically untar the archive, and thus you will no longer need to use get_all_tar_handlers
.
But as Martin mentioned, you still can untar manually.
If for some reasons you still want to use tar datasets you cannot use it like this, on the all dataset, but refer to :
https://github.com/naver/kapture#example-file-structure
Thanks, I see. My dataset was not organised as in https://github.com/naver/kapture#example-file-structure
Hi ! I have an error "module 'kapture.io.csv' has no attribute 'get_all_tar_handlers'" after executing string in python
Here are my steps:
Have cloned this repo, created docker images in according to guide, then I had to correct launch of docker container in order to launch jupyter notebook inside docker container:
Then I had to install jupterlab inside docker container due to absence this package in DockerFile for kapture:
After that I launched jupyter notebook:
Then I opened jupyter notebook and executed the following strings:
After the last command I got the error :
How to resolve this error ?