AITTSMD / MTCNN-Tensorflow

Reproduce MTCNN using Tensorflow
1.51k stars 711 forks source link

运行gen_PNet_tfrecords出错 #254

Open missyangyangyang opened 5 years ago

missyangyangyang commented 5 years ago

你好,在运行gen_PNet_tfrecords是报错 Traceback (most recent call last): File "D:/github/MTCNN-Tensorflow-master/prepare_data/gen_PNet_tfrecords.py", line 131, in run(dir, net, output_directory, shuffling=True) File "D:/github/MTCNN-Tensorflow-master/prepare_data/gen_PNet_tfrecords.py", line 66, in run _add_to_tfrecord(filename, image_example, tfrecord_writer) File "D:/github/MTCNN-Tensorflow-master/prepare_data/gen_PNet_tfrecords.py", line 25, in _add_to_tfrecord image_data, height, width = _process_image_withoutcoder(filename) File "D:\github\MTCNN-Tensorflow-master\prepare_data\tfrecord_utils.py", line 184, in _process_image_withoutcoder image_data = image.tostring() AttributeError: 'NoneType' object has no attribute 'tostring' 我的是Windows系统,不知道能否指点一下

LiYangDoYourself commented 5 years ago

你这都没有读取到图片,则么转成tostring,找到读取图片那的路径看对不对

missyangyangyang commented 5 years ago

你这都没有读取到图片,则么转成tostring,找到读取图片那的路径看对不对

十分感谢,确实是图像的路径不对,已经找到错误成功调出来了。就是运行的速度有点慢。

LiYangDoYourself commented 5 years ago

你这都没有读取到图片,则么转成tostring,找到读取图片那的路径看对不对

十分感谢,确实是图像的路径不对,已经找到错误成功调出来了。就是运行的速度有点慢。 兄弟 可以

louqiqi commented 5 years ago

图片是哪一种图片 图片太多不知道是应该配置哪个路径

missyangyangyang commented 5 years ago

图片是哪一种图片 图片太多不知道是应该配置 我有些忘记了,应该是把相对路径改成了绝对路径

louqiqi commented 5 years ago

if name == 'main': dir = 'G:/MTCNN-Tensorflow-master/DATA/' net = 'PNet' output_directory = 'G:/MTCNN-Tensorflow-master/DATA/imglists/PNet' run(dir, net, output_directory, shuffling=True) 这个路径应该没有错了,为什么还是跑到11万张图片就又报这个错误了呢? @AITTSMD @missyangyangyang

SURABHI-GUPTA commented 4 years ago

has the issue solved ? please help

SURABHI-GUPTA commented 4 years ago

你好,在运行gen_PNet_tfrecords是报错 Traceback (most recent call last): File "D:/github/MTCNN-Tensorflow-master/prepare_data/gen_PNet_tfrecords.py", line 131, in run(dir, net, output_directory, shuffling=True) File "D:/github/MTCNN-Tensorflow-master/prepare_data/gen_PNet_tfrecords.py", line 66, in run _add_to_tfrecord(filename, image_example, tfrecord_writer) File "D:/github/MTCNN-Tensorflow-master/prepare_data/gen_PNet_tfrecords.py", line 25, in _add_to_tfrecord image_data, height, width = _process_image_withoutcoder(filename) File "D:\github\MTCNN-Tensorflow-master\prepare_data\tfrecord_utils.py", line 184, in _process_image_withoutcoder image_data = image.tostring() AttributeError: 'NoneType' object has no attribute 'tostring' 我的是Windows系统,不知道能否指点一下

Solution for this ?

CHENSY-SIYU commented 2 years ago

if name == 'main': dir = 'G:/MTCNN-Tensorflow-master/DATA/' net = 'PNet' output_directory = 'G:/MTCNN-Tensorflow-master/DATA/imglists/PNet' run(dir, net, output_directory, shuffling=True) 这个路径应该没有错了,为什么还是跑到11万张图片就又报这个错误了呢? @AITTSMD @missyangyangyang

我有差不多的问题想请教怎么解决的