gliese581gg / YOLO_tensorflow

tensorflow implementation of 'YOLO : Real-Time Object Detection'
Other
1.72k stars 656 forks source link

Extract weight values from darknet's (.weight) files. #8

Open Goldit opened 8 years ago

Goldit commented 8 years ago

Hi everyone,

Could anyone please show me how to extract weight values from darknet's (.weight) files to run with YOLO_tensorflow?

Thanks

charterscruz commented 8 years ago

Hi Goldit,

Did you had any news on this topic? I am also looking to carry out the same task.

Thanks

gliese581gg commented 8 years ago

Hi! I uploaded weight extractor code! I hope it will be useful! Please tell me if there is problem with code:)

charterscruz commented 8 years ago

Hi Gliese.

Thank you very much. This is working perfectly! I have tried the three networks (full, small and tiny).

mtourne commented 7 years ago

I've made a fork of darknet with the weight extraction code built in, so it's a little more maintainable hopefully. Check it out here :

https://github.com/mtourne/darknet

oplkqingy commented 7 years ago

Hi Gliese. I meet a question: after I run yolo in test mode (ex -> ./darknet yolo test cfg/yolo-small.cfg yolo-small.weights),and run "python YOLO_tiny_builder.py", I have not get YOLO_tiny.ckpt ,but get 4 files : YOLO_tiny.ckpt.data-00000-of-00001 YOLO_tiny.ckpt.index YOLO_tiny.ckpt.meta
checkpoint and the size of YOLO_tiny.ckpt.data-00000-of-00001and YOLO_tiny.ckpt.meta is not same as YOLO_tiny.ckpt from https://drive.google.com/file/d/0B2JbaJSrWLpza0FtQlc3ejhMTTA/view?usp=sharing. Could you tell me how to resolve it? thanks.

wingerboy commented 6 years ago

image can you guide me in the first few steps? I do not know how to implement it! thank u very much!!!

cws7777 commented 6 years ago
  1. Download YOLO_weight_extractor.tar.gz . and tar it.
  2. move to YOLO_weight_extrator
  3. wget https://pjreddie.com/media/files/yolo-tiny.weights
  4. cp _darknetdir/cfg/yolov1-tiny.cfg _YOLO_weight_extratordir/cfg
  5. ./darknet yolo test cfg/yolov1-tiny.cfg yolo-tiny.weights
srividhyaprakash commented 5 years ago

Hi @gliese581gg,

I am trying to run your code on my MacBook-Air, I run into the following error, "-bash: ./darknet: cannot execute binary file"

When I type in "file darknet", it gives the following output, "darknet: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=a52c46c8cb713865ca5eab71cdccd5cf09610241, with debug_info, not stripped"

Seems like the executable was built for a linux-64 machine. Is there a workaround? Any help would be appreciated. Thank you.

harshpal-singh commented 5 years ago

It looks like the YOLO_weight_extractor.tar.gz file is corrupted. I am not able to extract files out of it. Is there an updated version?

Thilanka97 commented 5 years ago

@gliese581gg , @cws7777 heyy but this can only extract weight files of YOLO version one right ? Is there a way to extract yolov2 weights ? Thanks in advance!