MaybeShewill-CV / bisenetv2-tensorflow

Unofficial tensorflow implementation of real-time scene image segmentation model "BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation"

Home Page:https://maybeshewill-cv.github.io/bisenetv2-tensorflow/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors in tools/cityscapes/make_cityscapes_tfrecords.py

hona-p opened this issue · comments

commented

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.

DATASET:
DATA_DIR: '/PATH/IMAGE_SCENE_SEGMENTATION/CITYSPACES'
IMAGE_TYPE: 'rgb' # choice rgb or rgba
NUM_CLASSES: 19
TEST_FILE_LIST: '/PATH/IMAGE_SCENE_SEGMENTATION/CITYSPACES/image_file_index/test.txt'
TRAIN_FILE_LIST: '/PATH/IMAGE_SCENE_SEGMENTATION/CITYSPACES/image_file_index/train.txt'
VAL_FILE_LIST: '/PATH/IMAGE_SCENE_SEGMENTATION/CITYSPACES/image_file_index/val.txt'
IGNORE_INDEX: 255
PADDING_VALUE: [127.5, 127.5, 127.5]
MEAN_VALUE: [0.5, 0.5, 0.5]
STD_VALUE: [0.5, 0.5, 0.5]
CPU_MULTI_PROCESS_NUMS: 16

commented

I checked "bisenetv2.yaml". What folder is that relative path based on?

@yakubota You may put absolute path here:)

commented

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.

image

@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:)

commented

Thank you. It's done! I'm sorry for the trouble I've caused you.

@yakubota Welcome:)