Errors in tools/cityscapes/make_cityscapes_tfrecords.py
hona-p opened this issue · comments
When I use this command to test, I got error:
The following error occurred. Please point out what needs to be fixed.
I think the problem is where to place the train.txt. I put it in several directories, but I don't know the right answer, so I'm not sure where to put the file. Please tell me if I should.
python python tools/cityscapes/make_cityscapes_tfrecords.py
Error:
[Errno 2] No such file or directory: '/data/example_dataset/cityscapes/image_file_index/train.txt'
Traceback (most recent call last):
File "tools/cityscapes/make_cityscapes_tfrecords.py", line 32, in
generate_tfrecords()
File "tools/cityscapes/make_cityscapes_tfrecords.py", line 22, in generate_tfrecords
io = cityscapes_tf_io.CityScapesTfIO()
File "C:\Users\students\Desktop\rakuseki\seg\bisenetv2-tensorflow-master\bisenetv2-tensorflow-master\tools\cityscapes\data_provider\cityscapes\cityscapes_tf_io.py", line 279, in init
self._writer = _CityScapesTfWriter()
File "C:\Users\students\Desktop\rakuseki\seg\bisenetv2-tensorflow-master\bisenetv2-tensorflow-master\tools\cityscapes\data_provider\cityscapes\cityscapes_tf_io.py", line 68, in init
self._load_train_val_image_index()
File "C:\Users\students\Desktop\rakuseki\seg\bisenetv2-tensorflow-master\bisenetv2-tensorflow-master\tools\cityscapes\data_provider\cityscapes\cityscapes_tf_io.py", line 90, in _load_train_val_image_index
raise err
File "C:\Users\students\Desktop\rakuseki\seg\bisenetv2-tensorflow-master\bisenetv2-tensorflow-master\tools\cityscapes\data_provider\cityscapes\cityscapes_tf_io.py", line 79, in _load_train_val_image_index
with open(self._train_image_index_file_path, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/data/example_dataset/cityscapes/image_file_index/train.txt'
@yakubota Check this file and make sure you have the right file path here.
bisenetv2-tensorflow/config/cityscapes/cityscapes_bisenetv2.yaml
Lines 25 to 36 in ea07cc3
I checked "bisenetv2.yaml". What folder is that relative path based on?
@yakubota You may put absolute path here:)
When I add the path to the base folder path, I get a text file, "train.txt". Specifically, I want to know which folder I should put the "train.txt" in based on this "bisenetv2.yaml" that you presented. Let me know if that's okay.
add path: "/PATH/IMAGE_SCENE_SEGMENTATION/CITYSPACES/image_file_index/train.txt"
"bisenetv2.yaml" file of mine is the same as the one I downloaded.
@yakubota You can put "train.txt" to anywhere you like as if the file path was correctly written in the yams file:)
@yakubota Eg. If you put train.txt file in D:\train.txt then you should write D:\train.txt to yaml file:)
Thank you. It's done! I'm sorry for the trouble I've caused you.
@yakubota Welcome:)