AITTSMD / MTCNN-Tensorflow

Reproduce MTCNN using Tensorflow
1.51k stars 713 forks source link

gen_hard_example #247

Open wanggoudanscd opened 5 years ago

wanggoudanscd commented 5 years ago

@AITTSMD 您好,当我运行 gen_hard_example.py时遇到以下错误:

File "..\Detection\fcn_detector.py", line 35, in init assert readstate, "the params dictionary is not valid"

AssertionError: the params dictionary is not valid 请问怎么解决,谢谢您~

Leonliou commented 5 years ago

请问您解决了吗,我也遇到了

wanggoudanscd commented 5 years ago

我还没有解决,您解决了吗?我问了一下说是模型没有读取成功

在 2019-03-06 10:02:27,"Leonliou" notifications@github.com 写道:

请问您解决了吗,我也遇到了

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Leonliou commented 5 years ago

我还没有解决,您解决了吗?我问了一下说是模型没有读取成功 在 2019-03-06 10:02:27,"Leonliou" notifications@github.com 写道: 请问您解决了吗,我也遇到了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

没有呢,还在看,,模型就是训练出来的,不知道哪里出了问题

wanggoudanscd commented 5 years ago

哈哈哈哈哈我也是按着那个步骤弄的,那就谁先弄出来了就告诉一声吧

在 2019-03-07 10:28:02,"Leonliou" notifications@github.com 写道:

我还没有解决,您解决了吗?我问了一下说是模型没有读取成功 在 2019-03-06 10:02:27,"Leonliou" notifications@github.com 写道: 请问您解决了吗,我也遇到了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

没有呢,还在看,,模型就是训练出来的,不知道哪里出了问题

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Leonliou commented 5 years ago

哈哈哈哈哈我也是按着那个步骤弄的,那就谁先弄出来了就告诉一声吧 在 2019-03-07 10:28:02,"Leonliou" notifications@github.com 写道: 我还没有解决,您解决了吗?我问了一下说是模型没有读取成功 在 2019-03-06 10:02:27,"Leonliou" notifications@github.com 写道: 请问您解决了吗,我也遇到了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. 没有呢,还在看,,模型就是训练出来的,不知道哪里出了问题 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

好的,要不加个微信交流一下?

wanggoudanscd commented 5 years ago

好的呀~wjx18712768825

在 2019-03-07 10:39:26,"Leonliou" notifications@github.com 写道:

哈哈哈哈哈我也是按着那个步骤弄的,那就谁先弄出来了就告诉一声吧 在 2019-03-07 10:28:02,"Leonliou" notifications@github.com 写道: 我还没有解决,您解决了吗?我问了一下说是模型没有读取成功 在 2019-03-06 10:02:27,"Leonliou" notifications@github.com 写道: 请问您解决了吗,我也遇到了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. 没有呢,还在看,,模型就是训练出来的,不知道哪里出了问题 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

好的,要不加个微信交流一下?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

nspsfs commented 5 years ago

可以试着在MTCNN_model文件夹下新建PNet_No_Landmark文件夹,并把PNet_landmark中的模型复制过去。运行时将输入参数 test_mode设置为PNet。

missyangyangyang commented 5 years ago

好的呀~wjx18712768825 在 2019-03-07 10:39:26,"Leonliou" notifications@github.com 写道: 哈哈哈哈哈我也是按着那个步骤弄的,那就谁先弄出来了就告诉一声吧 在 2019-03-07 10:28:02,"Leonliou" notifications@github.com 写道: 我还没有解决,您解决了吗?我问了一下说是模型没有读取成功 在 2019-03-06 10:02:27,"Leonliou" notifications@github.com 写道: 请问您解决了吗,我也遇到了 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. 没有呢,还在看,,模型就是训练出来的,不知道哪里出了问题 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. 好的,要不加个微信交流一下? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

请问问题解决了吗,我也遇到了同样的问题

xxcheng0708 commented 5 years ago

注意文件夹名字中的大小写,代码中PNet_No_Landmark用的是大写的L

bibixiuxiuxiu commented 5 years ago

请问有老铁知道怎么解决了吗?

xxcheng0708 commented 5 years ago

就是PNet_No_Landmark文件夹名字大小写的问题,仔细看一下代码中配置的文件夹名称和实际目录的名称大小写是否一致????????????

chenkeyi2013 commented 5 years ago

@AITTSMD 您好,当我运行 gen_hard_example.py时遇到以下错误:

File "..\Detection\fcn_detector.py", line 35, in init assert readstate, "the params dictionary is not valid"

AssertionError: the params dictionary is not valid 请问怎么解决,谢谢您~

他这一步好像是检查模型是否读取成功,出现这个报错猜测是因为路径错误没有成功读取到模型CKPT. """

check whether the dictionary is valid

        model_dict = '/'.join(model_path.split('/')[:-1])
        ckpt = tf.train.get_checkpoint_state(model_dict)
        print(model_path)
        readstate = ckpt and ckpt.model_checkpoint_path
        assert  readstate, "the params dictionary is not valid"
        print("restore models' param")
        saver.restore(self.sess, model_path)

""" 这一段代码中,saver.restore()传入sess,ckpt文件的路径. 你可以将他前面的一堆操作删除,把saver.restore里的路径换成自己的ckpt绝对路径. 例如我的ckpt文件是 '/home/model/ckpt-100000' (不带.meta) 将这一段注释中的代码全部改成 saver.restore(self.sess, '/home/model/ckpt-100000')

SS2011 commented 5 years ago

在 train_PNet.py 中 Model 的路徑是 : "'data/%s_model/PNet_landmark/PNet' % model_name". 在gen_hard_example.py 中 Model 的路徑是 "../data/MTCNN_model/PNet_No_Landmark/PNet" 所以把 gen_hard_example.py 中,路徑修正過(把No 去掉)就可以了。

sulenn commented 4 years ago

../data/MTCNN_model/PNet_No_Landmark/PNet

将第198行,default=['../data/MTCNN_model/PNet_No_Landmark/PNet', '../data/MTCNN_model/RNet_No_Landmark/RNet', '../data/MTCNN_model/ONet_No_Landmark/ONet'],

修改为:default=['../data/MTCNN_model/PNet_landmark/PNet', '../data/MTCNN_model/RNet_landmark/RNet', '../data/MTCNN_model/ONet_landmark/ONet'],

即可

galuhputraa commented 1 year ago

oh man i cant really understand u guys i have this problem , can u guys explain to me briefly how to solve this issue? thanks