thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

'framework' object has no attribute 'preprocess' #444

Open LiangHao92 opened 6 years ago

LiangHao92 commented 6 years ago

I want to get the prediction in Json by: ./flow --imgdir scene_test_a_images_20170922/ --model cfg/densenet201_test.cfg --load densenet201_test.weights --json

But I get the error: Traceback (most recent call last): File "./flow", line 6, in <module> cliHandler(sys.argv) File "/home/seven/darkflow/darkflow/cli.py", line 37, in cliHandler tfnet.predict() File "/home/seven/darkflow/darkflow/net/flow.py", line 123, in predict this_inp = self.framework.preprocess(this_inp) AttributeError: 'framework' object has no attribute 'preprocess'

How can I deal with it

Gongfeng-LI commented 6 years ago

I have the same problem while loading darknet19 weights: ./flow --model cfg/darknet19_448.cfg --load bin/darknet19_448_conv23.weights

Error: Traceback (most recent call last): File "./flow", line 6, in <module> cliHandler(sys.argv) File "/home/st/workspace/darkflow/darkflow/cli.py", line 37, in cliHandler tfnet.predict() File "/home/st/workspace/darkflow/darkflow/net/flow.py", line 123, in predict this_inp = self.framework.preprocess(this_inp) AttributeError: 'framework' object has no attribute 'preprocess'

Anyone can help? Many thanks!

Gongfeng-LI commented 6 years ago

It seems that this project only supports yolo/yolov2 series models by looking into the file framework.py.