Deep-SORT-YOLOv4 icon indicating copy to clipboard operation
Deep-SORT-YOLOv4 copied to clipboard

any implementation for tiny yolov4 version?

Open farhantandia opened this issue 4 years ago • 2 comments

Fail to convert tiny version, any help for it? thanks

farhantandia avatar Jul 23 '20 04:07 farhantandia

well, instead of modifying convert.py I tried to work out demo.py. There one should import:

from yolov4.tf import YOLOv4 # (this can be installed with pip)

and read in the weight of yolov4-tiny:

yolo = YOLOv4(tiny=True) yolo.classes = "model_data/coco_classes.txt" yolo.make_model() yolo.load_weights("model_data/yolov4-tiny.weights", weights_type="yolo")

So far so good, until I start with encoding:

from tools import generate_detections as gdet ... encoder = gdet.create_box_encoder("model_data/mars-small128.pb", batch_size=1) ... features = encoder(frame, boxes) ...

if one looks in the appropriate source: tools/generate_detections .py, there one finds

import tensorflow as tf import tensorflow.compat.v1 as tf tf.disable_v2_behavior()

and exactly this spoils in the main code everything which has to deal with tensorflow 2. In fact, it is needed only inside class ImageEncoder(object)

Would someone hint how to work out this encoder in tf2 (best), or how to limit the use of tf1 to the encoder module only, or at least explain - what is the purpose of encoder?

freitaucher avatar Aug 05 '20 09:08 freitaucher

Ok, the purpose of encoder is now clear. It simplifies the input info for tracker. Anyway, the technical issue with tf2 remains..

freitaucher avatar Aug 05 '20 11:08 freitaucher