Closed YuyangSunshine closed 1 year ago
Hi @YuyangSunshine, it seems that you are using the original annotation files and not processing them to convert them to coco format.
Please refer to dataset_prepare.md for instructions on how to download and prepare the SHIFT dataset.
Hope this helps!
Thanks a lot! I will try to fix it by your suggestion.
No problem, please let me know if it works!
After fixing the docker image, I met a new problem when I run docker run -v ../data/shift/continuous/videos/1x/val/front/img.tar -e MODE=hdf5 shift_dataset_decompress
Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details import(pkg_name) File "/usr/src/app/shift_dev/init.py", line 1, in
from .dataloader.shift_dataset import SHIFTDataset File "/usr/src/app/shift_dev/dataloader/shift_dataset.py", line 14, in from scalabel.label.io import parse File "/usr/local/lib/python3.8/site-packages/scalabel/init.py", line 3, in from . import bot, label, tools File "/usr/local/lib/python3.8/site-packages/scalabel/label/init.py", line 3, in from . import coco_typing, from_coco, io, to_coco, typing File "/usr/local/lib/python3.8/site-packages/scalabel/label/from_coco.py", line 9, in from ..common.io import open_read_text File "/usr/local/lib/python3.8/site-packages/scalabel/common/io.py", line 10, in from .typing import DictStrAny File "/usr/local/lib/python3.8/site-packages/scalabel/common/typing.py", line 10, in NDArrayF64 = npt.NDArray[np.float64] AttributeError: module 'numpy.typing' has no attribute 'NDArray'
That seems like a problem with the numpy version and scalabel version.
Did you build the docker with the following command?
docker build -t shift_dataset_decompress .
Also, please change the mode to .tar:
# run the container (the mode is set to "tar")
docker run -v <path/to/data>:/data -e MODE=tar shift_dataset_decompress
Yes, I used the corresponding command to build the docker.
I have chenge the mode as .tar, but it still have the same problem.
Okay, thanks for the reply. We are working on it, scalabel recently applied their requirements and created some incompatibility with the shift-dev repo.
I'll update this issue as soon as it's solved.
Okay, thanks for the reply. We are working on it, scalabel recently applied their requirements and created some incompatibility with the shift-dev repo.
I'll update this issue as soon as it's solved.
Thank you! If you solve this problem, please let me know.
https://github.com/SysCV/shift-dev/pull/61
Please have a look at the following PR, which should address your problem. Let me know if it works.
Following your suggestion, I successfully address the docker problem.
But when I run:
docker run -v /data/**/*.tar -e MODE=tar shift_dataset_decompress
It will occuer this problem:
[07/03/2023 10:56:36] SHIFT DevKit - INFO - Files to convert: 1
[07/03/2023 10:56:36] SHIFT DevKit - INFO - Starting conversion to tar
[07/03/2023 10:56:36] SHIFT DevKit - INFO - Note: You can also run this code using multi-processing by setting `-j` option.
[07/03/2023 10:56:36] SHIFT DevKit - INFO - Processing /data/**/*.tar
Traceback (most recent call last):
File "/usr/src/app/shift_dev/io/decompress_videos.py", line 70, in convert_to_archive
tar_file = TarArchiveReader(tar_filepath)
File "/usr/src/app/shift_dev/utils/storage.py", line 76, in __init__
self.file = tarfile.TarFile(filename, "r")
File "/usr/local/lib/python3.8/tarfile.py", line 1639, in __init__
fileobj = bltn_open(name, self._mode)
IsADirectoryError: [Errno 21] Is a directory: '/data/**/*.tar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/src/app/shift_dev/io/decompress_videos.py", line 224, in <module>
main()
File "/usr/src/app/shift_dev/io/decompress_videos.py", line 219, in main
convert(f, args.tmp_dir, show_progress_bar=True)
File "/usr/src/app/shift_dev/io/decompress_videos.py", line 72, in convert_to_archive
logger.error("Cannot open {}. ".format(tar_filepath) + e)
TypeError: can only concatenate str (not "IsADirectoryError") to str
Or I run:
docker`` run -v "../data" -e MODE=tar
shift_dataset_decompress`
or
docker`` run -v ../data -e MODE=tar
shift_dataset_decompress`
It will output:
[07/03/2023 10:47:03] SHIFT DevKit - INFO - Files to convert: 0
[07/03/2023 10:47:03] SHIFT DevKit - INFO - Starting conversion to tar
[07/03/2023 10:47:03] SHIFT DevKit - INFO - Note: You can also run this code using multi-processing by setting `-j` option.
According to the documentation, this is the command that you should run:
docker run -v <path/to/data>:/data -e MODE=tar shift_dataset_decompress
If your data directory is at ../data
, this means that you should run the following command:
docker run -v ../data/**/*.tar:/data -e MODE=tar shift_dataset_decompress
Please let me know if this solves your issue!
Okay, I solved this error now. Thanks. :^~^:
Some errors happened during validatting the source model on the validation set of the continuous target domain.
I tried to modify the attribute ('category' -> 'categories') in the _det_2dcocoformat.json (there is no corresponding file in the provided datasets.), but it still didn't work.