tanluren / yolov3-channel-and-layer-pruning

yolov3 yolov4 channel and layer pruning, Knowledge Distillation 层剪枝,通道剪枝,知识蒸馏
Apache License 2.0
1.5k stars 446 forks source link

通道剪枝的时候遇到问题~ #179

Open Look4-you opened 2 years ago

Look4-you commented 2 years ago

hi ~

在通道剪枝的时候遇到如下问题, ![Uploading image.png…]()

**root@tplink-Z390-UD:/home/tplink/caffe_yolov3/yolov3-channel-and-layer-pruning-master# python slim_prune.py --cfg wjh-ebd/yolov4-leaky-cut-ebd.cfg --data wjh-ebd/ebd.data --weights wjh-ebd/yolov4-leaky-cut-ebd_best.weights --global_percent 0.8 --layer_keep 0.01 Namespace(cfg='wjh-ebd/yolov4-leaky-cut-ebd.cfg', data='wjh-ebd/ebd.data', global_percent=0.8, img_size=416, layer_keep=0.01, weights='wjh-ebd/yolov4-leaky-cut-ebd_best.weights') WARNING: smart bias initialization failure. WARNING: smart bias initialization failure. WARNING: smart bias initialization failure.

loaded weights from wjh-ebd/yolov4-leaky-cut-ebd_best.weights

let's test the original model first: Class Images Targets P R mAP F1: 0%| | 0/1065 [00:00<?, ?it/s]

QObject::moveToThread: Current thread (0x55b48c1823c0) is not the object's thread (0x55b48e1061f0).

Cannot move to target thread (0x55b48c1823c0)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/opt/conda/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

Aborted (core dumped) **

请问下是什么原因,已经按照requirements.txt安装好环境了

ChenLBrave commented 1 year ago

问题出在train.py的336行 plot_images(imgs=imgs, targets=targets, paths=paths, fname=fname),问题应该是qt库的环境变量没有得到正确设置

解决:https://blog.csdn.net/qq_33638170/article/details/114395754