Comments (19)
Same problem here. Tried all possible mirrors for yolov4 weights.
But I've made only one change to convert.py: replaced from keras import backend as K
to import tensorflow.python.keras.backend as K
, because original import caused another problem:
AttributeError: module 'keras.backend' has no attribute 'get_session'
from keras-yolo4.
I meet the problem too.I search in Google,somebody say that it maybe your keras model isn't match yolov4.weights.So I try to figure out.
from keras-yolo4.
Traceback (most recent call last):
File "convert.py", line 173, in
yolo4_model = Yolo4(score, iou, anchors_path, classes_path, model_path, weights_path)
File "convert.py", line 157, in init
self.load_yolo()
File "convert.py", line 130, in load_yolo
buffer=weights_file.read(weights_size * 4))
I solve the problem,but I use my code.Here is link.Besides, my keras model is mismatch the AlexeyAB-version.So I just load csp-darknet.
from keras-yolo4.
Got the same issue when I tried to convert my tiny-yolov4, trained with AlexeyAB darknet version
from keras-yolo4.
I've got this error as well. Did anyone manage to solve it?
from keras-yolo4.
any updates?
from keras-yolo4.
@Amokstakov I've retrained my data by setting image size to (608,608) in yolov4-custom config file and it works.
from keras-yolo4.
@JoshieLim I am struggling converting the downloaded yolo_4.weights file to the yolo4.h5 file using the conver.py
Any insight into this? I am lookign and the convert.py never actually references the .cfg file for yolo4?
from keras-yolo4.
@Amokstakov Hmm that's odd. I'm able to convert to .h5 on my end. Did you set the anchors path to a yolo4_anchors? It should look something like this for yolov4 anchors 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401.
from keras-yolo4.
Still no luck here.
Would it be too much trouble to ask for a direct step-by-step of what you did @JoshieLim
like from GitClone... what are the next steps into running the detect then test.py code?
from keras-yolo4.
Any update?
from keras-yolo4.
@Amokstakov Can you try to convert this yolov4.weights from this link. See if it works.
#get yolov4 pre-trained weights
!wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights
from keras-yolo4.
@ybloch Hi, Have you managed to convert tiny_yolov4.weights to .h5? It's pre-trained tiny_yolov4, not custom tiny_yolov4 model.
from keras-yolo4.
@MuhammadAsadJaved Hi,
I could not convert it to H5 so I converted it to a TensorFlow model and with it, I use for production.
Here's how I did it:
Using repo: [https://github.com/hunglc007/tensorflow-yolov4-tflite]
-
git clone https://github.com/hunglc007/tensorflow-yolov4-tflite
-
cd tensorflow-yolov4-tflite
-
sudo python3 save_model.py --weights yolov4-tiny-custom_final.weights --output ./checkpoints/yolov4_v1_darknet-416 --input_size 416 --model yolov4 --framework tflite
-
sudo python3 convert_tflite.py --weights ./checkpoints/yolov4_v1_darknet-416 --quantize_mode fp16 --output ./checkpoints/yolov4_v1_darknet-416_fp16.tflite
You will find in this project an example of using the converted model
from keras-yolo4.
@ybloch OK. Thanks for sharing dear. Actually I need keras model for some other project (tiny_yolov4+deep_sort). It's a project for detection and then applying tracker on detections.
from keras-yolo4.
did anyone manage to convert the model? If yes, please help
from keras-yolo4.
Thank @Runist for you comment I have converted yolov4.weights file to .h5 file using Runist YOLOV4 Repository "
from keras-yolo4.
YOLOV4 Repository
@maazullah96 this shows 404
from keras-yolo4.
Having same issue.
Did anyone convert custom trained yolov4 to .h5 model? If yes, then can you please share the steps here?
from keras-yolo4.
Related Issues (20)
- 恕我直言qqwweee那版yolo3就是个废仓库 HOT 13
- YOLO V4太容易OOM报错,有解决办法么,多GPU完全没法加速了 HOT 6
- Poor detection when trained on custom dataset HOT 19
- Error while converting to keras model HOT 11
- MemoryError
- keras和tensorflow的版本? HOT 1
- Your some layers are different from miemie2013's. HOT 1
- How about tiny yolov4?
- Error while running test.py
- Did you test accuracy of converted YOLOv4-model on MSCOCO?
- What do the four parameters after loss mean during training, loss of each category or other else?
- [BUG] iou computation in preprocess_true_boxes() should not use scaled bbox
- ValueError: Shapes (1, 1, 1024, 75) and (255, 1024, 1, 1) are incompatible HOT 5
- Batching with inference
- train.py
- Can't seems to be working with yolo tiny
- 网络结构层数对应问题
- convert h5 file
- 你好 ! 我不能導入 yolo4.py 的類別 YOLO
- ValueError: height and width must be > 0 - stable diffusion animation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-yolo4.