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

This error came when i test cfg/tiny-yolo-voc-1c.cfg .my mode after training the data . Any one can help please #764

Open sharoseali opened 6 years ago

sharoseali commented 6 years ago

C:\Users\MIPRG-P2\Anaconda3\lib\site-packages\h5py__init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters WARNING:tensorflow:From C:\Users\MIPRG-P2\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives. Parsing cfg/tiny-yolo-voc-1c.cfg Traceback (most recent call last): File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\realtimeDetection.py", line 10, in tfnet = TFNet(options) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\net\build.py", line 58, in init darknet = Darknet(FLAGS) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\dark\darknet.py", line 17, in init__ src_parsed = self.parse_cfg(self.src_cfg, FLAGS) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\dark\darknet.py", line 68, in parse_cfg for i, info in enumerate(cfg_layers): File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\utils\process.py", line 66, in cfg_yielder layers, meta = parser(model); yield meta; File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\utils\process.py", line 17, in parser with open(model, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'cfg/tiny-yolo-voc-1c.cfg'

sharoseali commented 6 years ago

the Error occurs when i test my cfg file named tiny-yolo-voc-1c.cfg.. after training the dataset. Any one who can help me . I am using darkflow on windows

youyuge34 commented 6 years ago

Please check the file cfg/tiny-yolo-voc-1c.cfg is existed.

sharoseali commented 6 years ago

yes the file exists .. this is the issue the even a file exists it show me this message however i give full path and darkflow respond me like this

WARNING:tensorflow:From C:\Users\MIPRG-P2\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives. Parsing C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\cfg\tiny-yolo-voc-1c.cfg Traceback (most recent call last): File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\realtimeDetection.py", line 12, in tfnet = TFNet(options) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\net\build.py", line 64, in init self.framework = create_framework(*args) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\net\framework.py", line 59, in create_framework return this(meta, FLAGS) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\net\framework.py", line 15, in init self.constructor(meta, FLAGS) File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\net\yoloinit.py", line 20, in constructor misc.labels(meta, FLAGS) #We're not loading from a .pb so we do need to load the labels File "C:\Users\MIPRG-P2\Desktop\dark\darkflow-master\darkflow\net\yolo\misc.py", line 36, in labels with open(file, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'labels.txt' Loading None ... Finished in 0.0s [Finished in 5.002s]

JoffreyN commented 6 years ago

E:\Users\ZP\Desktop\Getdata>flow.py --model cfg/yolov2-tiny-voc.cfg --load bin/yolov2-tiny-voc.weights --savepb

Parsing ./cfg/yolov2-tiny-voc.cfg Parsing cfg/yolov2-tiny-voc.cfg Loading bin/yolov2-tiny-voc.weights ... Successfully identified 63102560 bytes Finished in 0.04497408866882324s Traceback (most recent call last): File "E:\Users\ZP\Desktop\Getdata\flow.py", line 6, in cliHandler(sys.argv) File "D:\Program Files\Python36\lib\site-packages\darkflow\cli.py", line 26, in cliHandler tfnet = TFNet(FLAGS) File "D:\Program Files\Python36\lib\site-packages\darkflow\net\build.py", line 64, in init self.framework = create_framework(*args) File "D:\Program Files\Python36\lib\site-packages\darkflow\net\framework.py", line 59, in create_framework return this(meta, FLAGS) File "D:\Program Files\Python36\lib\site-packages\darkflow\net\framework.py", line 15, in init self.constructor(meta, FLAGS) File "D:\Program Files\Python36\lib\site-packages\darkflow\net\yolo__init__.py", line 20, in constructor misc.labels(meta, FLAGS) #We're not loading from a .pb so we do need to load the labels File "D:\Program Files\Python36\lib\site-packages\darkflow\net\yolo\misc.py", line 36, in labels with open(file, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'labels.txt'

JoffreyN commented 6 years ago

@sharoseali Did you solve it?

sharoseali commented 6 years ago

JofferyN... he command u r using is usually used when we train our own data set.. to save pb file... this command will work when u specify your labels file explicitly by using --labels filname

where filename is gile where u wil define your class names or labels on which your model is trained

On Thu, Jul 19, 2018, 2:00 PM JoffreyN notifications@github.com wrote:

@sharoseali https://github.com/sharoseali Did you solve it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thtrieu/darkflow/issues/764#issuecomment-406206527, or mute the thread https://github.com/notifications/unsubscribe-auth/AS8u8p6r4XBVRLHJcoRwZjJ8hbequGMjks5uIEqVgaJpZM4UENze .

masteroogway97 commented 5 years ago

@sharoseali kindly take a look at the error it's giving: FileNotFoundError: [Errno 2] No such file or directory: 'labels.txt' which means the file "labels.txt" is not found in the current directory. Please check your folder structure once.

masteroogway97 commented 5 years ago

@sharoseali @JoffreyN Did you guys solve it?

gokadroid commented 4 years ago

@sharoseali Did you solve it?

I solved it by switching the slash in my options. I was on windows 10 and was getting below error: FileNotFoundError: [Errno 2] No such file or directory: 'cfg/tiny-yolo-voc-1c.cfg'

I had options as:

options = {
    'model': 'cfg\tiny-yolo-voc-1c.cfg',
    :
    : 
}

I changed it to:

options = {
    'model': 'cfg/tiny-yolo-voc-1c.cfg',
    : 
    :
}
Narayanprasai commented 4 years ago

Parsing ./cfg/tiny-yolo-voc.cfg Parsing cfg/tiny-yolo-voc-7c.cfg Traceback (most recent call last): File "flow", line 6, in cliHandler(sys.argv) File "/home/mirait/Desktop/cvyolo/darkflow/darkflow/cli.py", line 26, in cliHandler tfnet = TFNet(FLAGS) File "/home/mirait/Desktop/cvyolo/darkflow/darkflow/net/build.py", line 58, in init darknet = Darknet(FLAGS) File "/home/mirait/Desktop/cvyolo/darkflow/darkflow/dark/darknet.py", line 24, in init des_parsed = self.parse_cfg(FLAGS.model, FLAGS) File "/home/mirait/Desktop/cvyolo/darkflow/darkflow/dark/darknet.py", line 68, in parse_cfg for i, info in enumerate(cfg_layers): File "/home/mirait/Desktop/cvyolo/darkflow/darkflow/utils/process.py", line 66, in cfg_yielder layers, meta = parser(model); yield meta; File "/home/mirait/Desktop/cvyolo/darkflow/darkflow/utils/process.py", line 17, in parser with open(model, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'cfg/tiny-yolo-voc-7c.cfg'

i have above mentioned problem. I don't know what's wrong.

I've kept the filters to 60 as I've seven classes of dataset. And those models are right there in the cfg file(file does exist). I even changed the labels as well. any help would be appreciated.

masteroogway97 commented 4 years ago

Check the directory structure that you've created and placed those files in.