Код: Выделить всё
!python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x {IMAGE_PATH + '/train'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/train.record'}!python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x {IMAGE_PATH + '/test'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/test.record'}
Код: Выделить всё
2024-11-16 16:28:22.414068: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-11-16 16:28:23.793272: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
Traceback (most recent call last):
File "C:\Users\rishi\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 62, in
label_map_dict = label_map_util.get_label_map_dict(label_map)
File "C:\Users\rishi\anaconda3\lib\site-packages\object_detection\utils\label_map_util.py", line 166, in get_label_map_dict
label_map = load_labelmap(label_map_path)
File "C:\Users\rishi\anaconda3\lib\site-packages\object_detection\utils\label_map_util.py", line 135, in load_labelmap
label_map_string = fid.read()
File "C:\Users\rishi\anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 116, in read
self._preread_check()
File "C:\Users\rishi\anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 77, in _preread_check
self._read_buf = _pywrap_file_io.BufferedInputStream(
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. tensorflow.python.lib.io._pywrap_file_io.BufferedInputStream(filename: str, buffer_size: int, token: tensorflow.python.lib.io._pywrap_file_io.TransactionToken = None)
Invoked with: item {
name: "Hello"
id: 1
}
item {
name: "Yes"
id: 2
}
item {
name: "No"
id: 3
}
item {
name: "ThankYou"
id: 4
}
item {
name: "ILoveYou"
id: 5
}
, 524288
Также каким-то образом в коде записи генерации tf используется
Код: Выделить всё
import tensorflow.compat.v1 as tfВ операторе Пожалуйста, посоветуйте, что делать.
Подробнее здесь: https://stackoverflow.com/questions/791 ... tensorflow
Мобильная версия