GithubHelp home page GithubHelp logo

yolov4-keras's Issues

模型如何转换到pb格式

我想把训练好的模型转换到tf-serving上使用, pb格式的,请问有什么代码可以参考的吗? 谢谢~

检测速度与AB大神的有点差异

你好,请问一下我用了你的代码在titan v上训练并检测,FPS只有30几,和论文中的96FPS差的有点多,能请教下是什么原因吗

input_shape

老師您好~
想詢問input是規定32的倍數嗎?
如果網路上找到的dataset不符合,能改掉input的尺寸嗎?
如果不改,一樣使用416416但輸入影像為500375,這樣會影響結果嗎?

请教一下学习数据大小的问题

新手请教:
人脸识别的一些应用只需要传一张人脸照片 就能够识别了。
我们检测目标的时候为什么要传千张的图片?一张不行吗?

yolov4的pytorch版本

大大啥时候可以弄个yolov4 pytorch版本,上次听了您的bilibili上关于yolov3讲解,非常期待yolov4的版本,谢谢

框不出物体

训练了一个类别,大约200图片,把 载入预训练权重 那块代码注释掉,训练400epoch,loss为59,val_loss为48,但是测试框不出物体,是我哪里出错了吗

整個資料夾

想請問如何測試整個資料夾的影像(.jpg或.mp4),並保存結果呢?
謝謝

On accessing the model files.

Your work is very valuable. Congratulations.

I cannot access the pan.baidu site. It does not allow access via Turkey. How can I access the files? Can you send a link to Google Drive.

Thank you in advance.

Best Regards.

一直不收敛

您好!我想问一下,我是使用VOC数据集,利用yolov4_weight.h5这个权重文件,进行迁移学习,针对于VOC数据集使用k-means聚类得到的anchor box进行训练,我将余弦退火和标签平滑都设置为true,但是loss一直在50多高居不下。我随后又减小了学习率,使用前面的权重文件继续训练,但是loss仍然不见变小,请问您有什么意见嘛?哦,对了,我分别尝试了608和416的,都没有得到好的结果,但是使用您的VOC数据集的权重,就可以直接得到比较高的mAP。

new issue

大兄弟,哈哈。
1.我的数据命名都是从1自增的,用voc2yoyo4.py生成的train.txt中数字却不是自增的。这是不是无法和图片一一对应了。
2.运行voc_annotation.py时,显示UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 96: illegal multibyte sequence;这个我查了都是从生成的文件中读数据,也没发现有非法字符。这是怎么回事呀

FPS 問題

跟您請教一下,使用訓練好的Model,執行Video.py ,播放mp4檔案。
但FPS 落在15~17 Fps 。請問是否正常? 該如何提高? (GPU: GTX1060)
Thanks

关于train报错的问题

yolov4-keras>python train.py
Using TensorFlow backend.
WARNING: Logging before flag parsing goes to stderr.
W0619 14:05:04.133064 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:95: The name tf.reset_default_graph is d
eprecated. Please use tf.compat.v1.reset_default_graph instead.

W0619 14:05:04.134061 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:98: The name tf.placeholder_with_default
is deprecated. Please use tf.compat.v1.placeholder_with_default instead.

W0619 14:05:04.144034 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:102: The name tf.get_default_graph is de
precated. Please use tf.compat.v1.get_default_graph instead.

W0619 14:05:04.145031 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecat
ed. Please use tf.compat.v1.placeholder instead.

Create YOLOv4 model with 9 anchors and 5 classes.
W0619 14:05:04.146029 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:4138: The name tf.random_uniform is depr
ecated. Please use tf.random.uniform instead.

2020-06-19 14:05:04.159481: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-06-19 14:05:04.164326: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll
2020-06-19 14:05:04.265335: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.635
pciBusID: 0000:01:00.0
2020-06-19 14:05:04.272995: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2020-06-19 14:05:04.276394: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2020-06-19 14:05:04.834369: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-19 14:05:04.837165: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0
2020-06-19 14:05:04.839025: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N
2020-06-19 14:05:04.841512: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8694 MB memory) -> physica
l GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
W0619 14:05:05.187247 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is
deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.

W0619 14:05:08.949218 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:3976: The name tf.nn.max_pool is depreca
ted. Please use tf.nn.max_pool2d instead.

W0619 14:05:09.150654 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:2018: The name tf.image.resize_nearest_n
eighbor is deprecated. Please use tf.compat.v1.image.resize_nearest_neighbor instead.

Load weights model_data/yolo4_weight.h5.
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_110 due to mismatch in shape ((1, 1, 1024, 30) vs
(255, 1024, 1, 1)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_110 due to mismatch in shape ((30,) vs (255,)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_102 due to mismatch in shape ((1, 1, 512, 30) vs (
255, 512, 1, 1)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_102 due to mismatch in shape ((30,) vs (255,)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_94 due to mismatch in shape ((1, 1, 256, 30) vs (2
55, 256, 1, 1)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_94 due to mismatch in shape ((30,) vs (255,)).
weight_values[i].shape))
W0619 14:05:14.228083 51072 deprecation.py:323] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\tensorflow\python\ops\array_ops.py:1354: add_dispatch_support..wrapper (from
tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
Freeze the first 249 layers of total 370 layers.
W0619 14:05:15.692210 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\optimizers.py:790: The name tf.train.Optimizer is deprecated. Please u
se tf.compat.v1.train.Optimizer instead.

Train on 6543 samples, val on 727 samples, with batch size 4.
W0619 14:05:22.052212 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\callbacks.py:850: The name tf.summary.merge_all is deprecated. Please
use tf.compat.v1.summary.merge_all instead.

W0619 14:05:22.052212 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\callbacks.py:853: The name tf.summary.FileWriter is deprecated. Please
use tf.compat.v1.summary.FileWriter instead.

Epoch 1/25
2020-06-19 14:05:27.713789: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] shape_optimizer failed: Invalid argument: Subshape must have computed start >= end since stride is
negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:28.038298: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] remapper failed: Invalid argument: Subshape must have computed start >= end since stride is negativ
e, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:29.572795: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] layout failed: Invalid argument: Subshape must have computed start >= end since stride is negative,
but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:30.708524: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] shape_optimizer failed: Invalid argument: Subshape must have computed start >= end since stride is
negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:30.933520: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] remapper failed: Invalid argument: Subshape must have computed start >= end since stride is negativ
e, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:33.817409: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
2020-06-19 14:05:33.820917: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
Traceback (most recent call last):
File "train.py", line 254, in
callbacks=[logging, checkpoint, reduce_lr, early_stopping])
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\training.py", line 1418, in fit_generator
initial_epoch=initial_epoch)
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\training_generator.py", line 217, in fit_generator
class_weight=class_weight)
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\training.py", line 1217, in train_on_batch
outputs = self.train_function(ins)
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py", line 2715, in call
return self._call(inputs)
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py", line 2675, in _call
fetched = self._callable_fn(*array_vals)
File "C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\tensorflow\python\client\session.py", line 1458, in call
run_metadata_ptr)
tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
(0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node conv2d_1/convolution}}]]
[[loss/add_109/_4921]]
(1) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node conv2d_1/convolution}}]]
0 successful operations.
0 derived errors ignored.
我的GPU cuda版本是10.1 请问下您是否遇到过此类问题,谢谢

修改grid维度

老师您好,请问如果想修改grid维度的话在哪里修改。

FPS 和yolo3

(sorry 按错 还没打完就发送了)
我试了一下你的 Yolov3 和 v4 但速度都是大概 FPS=6 的样子 (GTX1050),难道v4不应该更快一点吗

内存不足问题

"ran out of memory trying to allocate 570.66MiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available."
请问这个问题应该如何解决

问题

No module named 'utils.utils'怎么解决?

关于每张图检测数量最大为20的问题

我用wider face数据集在您的v4上训练,分类也改成了只有人脸1类,训练50个epoch后做测试,运行get_gt_txt,得到的ground-truth中有很多图片中的人脸数量都超过20个,但运行get_dr_txt.py后,所有的预测结果中,在每张人脸图片标出来的人脸最多都不超过20个,这是什么原因,谢谢!

PR Curve 問題

大神您好,跟您詢問,我將訓練好的Model 要,做PR Curve 要看效果好不好。
我依序執行get_dr_txt.py / get_gt_txt.py / 得到Input (detection-results/images-optional/ground-truth)
再執行get_map.py 想得到PR Curve, 但跑出來AP 為0。
比對Input 與Result 結果:
Input: detection-results 比ground-truth 多很多的Bounding box
detection-results 所框出的Bounding box 與我用predict.py 所跑出的結果,差異蠻多的。
想詢問是否是哪部分有做錯??
附件是相關的資料。
感謝。[
convex_mirror(23)
detection-results_convex_mirror(23).txt
ground-truth_convex_mirror(23).txt
predict result

計算mAP

老師您好~想詢問計算mAP得操作步驟?
有點搞不太懂

epoch问题

你好,在按照您的步骤训练自己数据集的时候,修改epoch和freeze epoch后 loss一直nan 用您设定的值就正常。但是epoch 27就自动停止了,loss有65左右,单张图片检测想效果还行,用摄像头检测的话,误检严重。您有什么好的办法去修改优化吗

请教一下,跑原项目的时候video.py y4只识别出2个目标,y3识别出5个目标

首先非常喜欢你的视频,声音很好听。
我在跑你的项目y4 和y3, 我没有什么修改,直接跑,同一个视频
y4识别出2个 目标 ,人 和椅子,y3则能多识别出三个目标 不知道为什么会导致这种差异
另外非常想知道 y4 fps 在我的电脑上只有0.6 y3 fps有0.8 我的电脑是不是该扔了,请教这两个项目最高fps大概能跑到多少,如果想优化应该调整那个部分能使它们跑的更快。非常感谢

关于训练集resize的问题

大佬好,

我造了一些不同size的图片做训练集,在用yolo4训练之前还需要resize并处理好box的坐标吗?还是说无论什么图片都会在训练前被自动resize处理好?

叩谢

检测时box的数量是否设置了上限

老师您好,我用自己的训练集(单class)训练完成后进行测试时发现每张图片预测的数量上限都在20,我找了一下yolo.py并没有发现有相关的设置,请问这个上限是在哪里设置的,谢谢!

训练时loss值为nan

CUDA:10.0.130
系统:Ubuntu 16.04
tensorflow: 1.13
batchsize:8
问题:第一个eporch时loss就出现nan,采用COCO数据集,检测的目标物为:车辆、红绿灯、行人。
QQ截图20200806194946

DropBlock Issue

大佬,请问怎么加DropBlock,‘DropBlock2D(block_size=2, keep_prob=0.8, name='DropBlock')’ 貌似不行

.h5转saved在tf serving部署问题

楼主你好,我把训练的.h5模型转换成saved_model格式。并且定义了输入输出,可是我部署到saved_model后预测报You must feed a value for placeholder tensor 'input_1' with dtype float and shape [?,?,?,3][[{{node input_1}}]] 麻烦说一下解决方法。我的输入和预测代码的输入是一致的。

训练自己的数据问题

tensorflow.python.framework.errors_impl.InvalidArgumentError: slice index -1 of dimension 0 out of bounds.
for '{{node loss/yolo_loss_loss/strided_slice}} = StridedSlice[Index=DT_INT32, T=DT_INT32, begin_mask=0, ellipsis_mask=0, end_mask=0, new_axis_mask=0, shrink_axis_mask=1](loss/yolo_loss_loss/Shape, loss/yolo_loss_loss/strided_slice/stack, loss/yolo_loss_loss/strided_slice/stack_1, loss/yolo_loss_loss/strided_slice/stack_2)' with input shapes: [0], [1], [1], [1] and with computed input tensors: input[1] = <-1>, input[2] = <0>, input[3] = <1>.

训练3个epoch后loss变为nan

如果我把mosaic设置为True,大概第一个epoch走了一半就nan了。
如果我把mosaic设置为False, 大概第三个epoch走了一大半后就nan了是什么问题呢.

儲存影片

請問如何將偵測完的影片檔(.mp4),save成新的影片檔(.mp4)?
謝謝

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.