tensorflow ssd执行tf_convert_dat报错ValueError: You must supply the dataset directory with --dataset_dir
错误一:
Traceback (most recent call last): File "D:/work/SSD-Tensorflow-master/tf_convert_data.py", line 63, in tf.app.run() File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "D:/work/SSD-Tensorflow-master/tf_convert_data.py", line 53, in main raise ValueError('You must supply the dataset directory with --dataset_dir') ValueError: You must supply the dataset directory with --dataset_dir
Converting image 1626/2008Traceback (most recent call last): File "D:/work/SSD-Tensorflow-master/tf_convert_data.py", line 63, in tf.app.run() File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "D:/work/SSD-Tensorflow-master/tf_convert_data.py", line 58, in main pascalvoc_to_tfrecords.run(FLAGS.dataset_dir, FLAGS.output_dir, FLAGS.output_name) File "D:\work\SSD-Tensorflow-master\datasets\pascalvoc_to_tfrecords.py", line 218, in run _add_to_tfrecord(dataset_dir, img_name, tfrecord_writer) File "D:\work\SSD-Tensorflow-master\datasets\pascalvoc_to_tfrecords.py", line 177, in _add_to_tfrecord _process_image(dataset_dir, name) File "D:\work\SSD-Tensorflow-master\datasets\pascalvoc_to_tfrecords.py", line 116, in _process_image bboxes.append((float(bbox.find('ymin').text) / shape[0], ZeroDivisionError: float division by zero
Process finished with exit code 1 解决:就是程序本身是没有错的,错的是图像,点开错误的标注文件,查看异常情况。
# -*- coding:utf8 -*-
import os
class BatchRename():
'''
批量重命名文件夹中的图片文件
'''
def __init__(self):
# 我的图片文件夹路径horse
self.path = 'D:/work/SSD-Tensorflow-master/VOC2007/test/JPEGImages'
def rename(self):
filelist = os.listdir(self.path)
total_num = len(filelist)
i = 1
n = 6
for item in filelist:
if item.endswith('.xml'):
n = 6 - len(str(i))
src = os.path.join(os.path.abspath(self.path), item)
dst = os.path.join(os.path.abspath(self.path), str(0) * n + str(i) + '.xml')
try:
os.rename(src, dst)
print
'converting %s to %s ...' % (src, dst)
i = i + 1
except:
continue
print
'total %d to rename & converted %d jpgs' % (total_num, i)
if __name__ == '__main__':
demo = BatchRename()
demo.rename()
#参考其他人的,挺好用不是自己写,具体是哪个csdn忘了
错误三:
Converting image 1697/2005Traceback (most recent call last):
File "D:/work/SSD-Tensorflow-master/tf_convert_data.py", line 63, in
tf.app.run()
File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "D:/work/SSD-Tensorflow-master/tf_convert_data.py", line 58, in main
pascalvoc_to_tfrecords.run(FLAGS.dataset_dir, FLAGS.output_dir, FLAGS.output_name)
File "D:\work\SSD-Tensorflow-master\datasets\pascalvoc_to_tfrecords.py", line 227, in run
_add_to_tfrecord(dataset_dir, img_name, tfrecord_writer)
File "D:\work\SSD-Tensorflow-master\datasets\pascalvoc_to_tfrecords.py", line 186, in _add_to_tfrecord
_process_image(dataset_dir, name)
File "D:\work\SSD-Tensorflow-master\datasets\pascalvoc_to_tfrecords.py", line 83, in _process_image
image_data=tf.gfile.FastGFile(filename, 'rb').read()
File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\lib\io\file_io.py", line 125, in read
self._preread_check()
File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\lib\io\file_io.py", line 85, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\errors_impl.py", line 519, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: ./VOC2007/test/JPEGImages/001697.jpg : ϵͳ\udcd5Ҳ\udcbb\udcb5\udcbdָ\udcb6\udca8\udcb5\udcc4\udcceļ\udcfe\udca1\udca3
; No such file or directory
Edo Interactive在几年前遇到一个大问题:公司使用交易数据来帮助零售商和餐馆进行个性化促销,但其数据仓库没有足够时间去处理所有的信用卡和借记卡交易数据
“我们要花费27小时来处理每日的数据量,”Edo主管基础设施和信息系统的高级副总裁Tim Garnto说道:“所以在2013年,我们放弃了现有的基于PostgreSQL的关系型数据库系统,使用了Hadoop集群作为公司的数
例如我们把scott.dept表生成文本文件的语句写成dept.sql,内容如下:
set pages 50000;
set lines 200;
set trims on;
set heading off;
spool /oracle_backup/log/test/dept.lst;
select deptno||','||dname||','||loc
1. Download and unzip the SonarQube distribution
2. Starting the Web Server
The default port is "9000" and the context path is "/". These values can be changed in &l
昨天在为了把laravel升级到最新的版本,突然之间就出现了如下错误:
ErrorException thrown with message "Declaration of Illuminate\View\Engines\CompilerEngine::handleViewException() should be compatible with Illuminate\View\Eng
import java.util.Arrays;
import java.util.Random;
public class Nim {
/**编程之美 NIM游戏分析
问题:
有N块石头和两个玩家A和B,玩家A先将石头随机分成若干堆,然后按照BABA...的顺序不断轮流取石头,
能将剩下的石头一次取光的玩家获胜,每次取石头时,每个玩家只能从若干堆石头中任选一堆,
今天在测试环境使用yum安装,遇到一个问题:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
处理很简单,修改文件“/etc/yum.repos.d/epel.repo”, 将baseurl的注释取消, mirrorlist注释掉。即可。
&n
今天在linux下做hbase集群的时候,发现hmaster启动成功了,但是用hbase命令进入shell的时候报了一个错误 PleaseHoldException: Master is initializing,查看了日志,大致意思是说master和slave时间不同步,没办法,只好找一种手动同步一下,后来发现一共部署了10来台机器,手动同步偏差又比较大,所以还是从网上找现成的解决方