视频目标检测识别

2023-11-07

之前文章目标检测API 已经介绍过API的基本使用,这里就不赘述了,直接上本次内容的代码了,添加的内容并不多。将测试的test.mp4原文件放到models-master\research\object_detection路径下,并创建一个detect_video.py文件,代码内容如下:

import os
import cv2
import time
import argparse
import multiprocessing
import numpy as np
import tensorflow as tf
from matplotlib import pyplot as plt
import matplotlib
# Matplotlib chooses Xwindows backend by default.
matplotlib.use('Agg')
from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as vis_util

'''
视频目标追踪
'''

# Path to frozen detection graph. This is the actual model that is used for the object detection.
MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_17'
PATH_TO_CKPT = os.path.join(MODEL_NAME, 'frozen_inference_graph.pb')

# List of the strings that is used to add correct label for each box.
PATH_TO_LABELS = os.path.join('data', 'mscoco_label_map.pbtxt')

NUM_CLASSES = 90

label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)

def detect_objects(image_np, sess, detection_graph):
    # Expand dimensions since the model expects images to have shape: [1, None, None, 3]
    image_np_expanded = np.expand_dims(image_np, axis=0)
    image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')

    # Each box represents a part of the image where a particular object was detected.
    boxes = detection_graph.get_tensor_by_name('detection_boxes:0')

    # Each score represent how level of confidence for each of the objects.
    # Score is shown on the result image, together with the class label.
    scores = detection_graph.get_tensor_by_name('detection_scores:0')
    classes = detection_graph.get_tensor_by_name('detection_classes:0')
    num_detections = detection_graph.get_tensor_by_name('num_detections:0')

    # Actual detection.
    (boxes, scores, classes, num_detections) = sess.run(
        [boxes, scores, classes, num_detections],
        feed_dict={image_tensor: image_np_expanded})

    # Visualization of the results of a detection.
    vis_util.visualize_boxes_and_labels_on_image_array(
        image_np,
        np.squeeze(boxes),
        np.squeeze(classes).astype(np.int32),
        np.squeeze(scores),
        category_index,
        use_normalized_coordinates=True,
        line_thickness=8)
    return image_np

#Load a frozen TF model
detection_graph = tf.Graph()
with detection_graph.as_default():
    od_graph_def = tf.GraphDef()
    with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:
        serialized_graph = fid.read()
        od_graph_def.ParseFromString(serialized_graph)
        tf.import_graph_def(od_graph_def, name='')



#import imageio
#imageio.plugins.ffmpeg.download()
# Import everything needed to edit/save/watch video clips
from moviepy.editor import VideoFileClip
from IPython.display import HTML

def process_image(image):
    # NOTE: The output you return should be a color image (3 channel) for processing video below
    # you should return the final output (image with lines are drawn on lanes)
    with detection_graph.as_default():
        with tf.Session(graph=detection_graph) as sess:
            # 如果出现错误:ValueError: assignment destination is read-only,则将下面一行改为:
            #  image_process = detect_objects(np.array(image), sess, detection_graph)
            image_process = detect_objects(image, sess, detection_graph)
            return image_process

white_output = 'test_out.mp4'
clip1 = VideoFileClip("test.mp4").subclip(1,9)
white_clip = clip1.fl_image(process_image) #NOTE: this function expects color images!!s
white_clip.write_videofile(white_output, audio=False)

HTML("""
<video width="960" height="540" controls>
  <source src="{0}">
</video>
""".format(white_output))

检测结果:
检测结果
更新一个独立的检测现有视频脚本,这样可以方便在任意路径使用:

from moviepy.editor import VideoFileClip
from IPython.display import HTML
import tensorflow as tf
import cv2 as cv
import time

#Load a frozen TF model
detection_graph = tf.Graph()
with detection_graph.as_default():
    od_graph_def = tf.GraphDef()
    with tf.gfile.GFile('./frozen_inference_graph.pb', 'rb') as fid:
        serialized_graph = fid.read()
        od_graph_def.ParseFromString(serialized_graph)
        tf.import_graph_def(od_graph_def, name='')

def detect_objects(image, sess, detection_graph):

    height = image.shape[0]   
    width = image.shape[1]    
    channel = image.shape[2]  
    start_time = time.time()
    # Run the model
    out = sess.run([sess.graph.get_tensor_by_name('num_detections:0'),
                    sess.graph.get_tensor_by_name('detection_scores:0'),
                    sess.graph.get_tensor_by_name('detection_boxes:0'),
                    sess.graph.get_tensor_by_name('detection_classes:0')],
                    feed_dict={'image_tensor:0': image.reshape(1, height, width, channel)})

    end_time = time.time()
    runtime = end_time - start_time
    print('run time:%f' % (runtime * 1000) + 'ms')

    # Visualize detected bounding boxes.
    num_detections = int(out[0][0])

    # Iterate through the number of checked out rectangular boxes on the picture
    for i in range(num_detections):
        classId = int(out[3][0][i])
        score = float(out[1][0][i])
        bbox = [float(v) for v in out[2][0][i]]

        if score > 0.8:  # 这里的阈值自行修改即可
            #print(score)
            x = bbox[1] * width
            y = bbox[0] * height
            right = bbox[3] * width
            bottom = bbox[2] * height
            # Draw rectangular box
            font = cv.FONT_HERSHEY_SIMPLEX  # Use default fonts
            cv.rectangle(image, (int(x), int(y)), (int(right), int(bottom)), (0, 0, 255), thickness=2)
            cv.putText(image, '{}:'.format(classId) + str(('%.3f' % score)), (int(x), int(y - 9)), font, 0.6,
                        (0, 0, 255), 1)
    return image


def process_image(image):
    # NOTE: The output you return should be a color image (3 channel) for processing video below
    # you should return the final output (image with lines are drawn on lanes)
    with detection_graph.as_default():
        with tf.Session(graph=detection_graph) as sess:
            image_process = detect_objects(image, sess, detection_graph)
            return image_process

white_output = 'test_out.mp4'
# 使用 VideoFileClip 函数从视频中抓取图片,subclip(1,9)代表识别视频中1-9s这一时间段
clip1 = VideoFileClip("test.mp4").subclip(1,9)
# 用fl_image函数将原图片替换为修改后的图片,用于传递物体识别的每张抓取图片
white_clip = clip1.fl_image(process_image) #NOTE: this function expects color images!!
# 修改的剪辑图像被组合成为一个新的视频
white_clip.write_videofile(white_output, audio=False)

HTML("""
<video width="960" height="540" controls>
  <source src="{0}">
</video>
""".format(white_output))

上面的对现有的视频中目标进行检测的,那么怎样实时的对现实生活中的目标进行检测呢?这个其实也很简单,我们来创建一个object_detection_tutorial_video.py 文件,具体的代码如下:

import numpy as np  
import os  
import six.moves.urllib as urllib  
import sys  
import tarfile  
import tensorflow as tf  
import zipfile  
import matplotlib  
import cv2
# Matplotlib chooses Xwindows backend by default.  
matplotlib.use('Agg')  

from collections import defaultdict  
from io import StringIO  
from matplotlib import pyplot as plt  
from PIL import Image  
from utils import label_map_util  
from utils import visualization_utils as vis_util  

'''
    检测视频中的目标
'''

cap = cv2.VideoCapture(0)  #打开摄像头

##################### Download Model  
# What model to download.  
MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_17'  
MODEL_FILE = MODEL_NAME + '.tar.gz'  
DOWNLOAD_BASE = 'http://download.tensorflow.org/models/object_detection/'  
  
# Path to frozen detection graph. This is the actual model that is used for the object detection.  
PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'  
  
# List of the strings that is used to add correct label for each box.  
PATH_TO_LABELS = os.path.join('data', 'mscoco_label_map.pbtxt')  
  
NUM_CLASSES = 90  
  
# Download model if not already downloaded  
if not os.path.exists(PATH_TO_CKPT):  
    print('Downloading model... (This may take over 5 minutes)')  
    opener = urllib.request.URLopener()  
    opener.retrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE)  
    print('Extracting...')  
    tar_file = tarfile.open(MODEL_FILE)  
    for file in tar_file.getmembers():  
        file_name = os.path.basename(file.name)  
        if 'frozen_inference_graph.pb' in file_name:  
            tar_file.extract(file, os.getcwd())  
else:  
    print('Model already downloaded.')  
  
##################### Load a (frozen) Tensorflow model into memory.  
print('Loading model...')  
detection_graph = tf.Graph()  
  
with detection_graph.as_default():  
    od_graph_def = tf.GraphDef()  
    with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:  
        serialized_graph = fid.read()  
        od_graph_def.ParseFromString(serialized_graph)  
        tf.import_graph_def(od_graph_def, name='')  
  
##################### Loading label map  
print('Loading label map...')  
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)  
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)  
category_index = label_map_util.create_category_index(categories)  
  
##################### Helper code  
def load_image_into_numpy_array(image):  
  (im_width, im_height) = image.size  
  return np.array(image.getdata()).reshape(  
      (im_height, im_width, 3)).astype(np.uint8)  
  
##################### Detection ###########
  
print('Detecting...')  
with detection_graph.as_default():  
    with tf.Session(graph=detection_graph) as sess:
        
        # print(TEST_IMAGE_PATH)
        # image = Image.open(TEST_IMAGE_PATH)
        # image_np = load_image_into_numpy_array(image)
        while True:                              
            ret, image_np = cap.read()           #从摄像头中获取每一帧图像
            image_np_expanded = np.expand_dims(image_np, axis=0)
            image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')
            boxes = detection_graph.get_tensor_by_name('detection_boxes:0')
            scores = detection_graph.get_tensor_by_name('detection_scores:0')
            classes = detection_graph.get_tensor_by_name('detection_classes:0')
            num_detections = detection_graph.get_tensor_by_name('num_detections:0')
            # Actual detection.
            (boxes, scores, classes, num_detections) = sess.run(
            [boxes, scores, classes, num_detections],
                feed_dict={image_tensor: image_np_expanded})
             # Print the results of a detection.
            print(scores)
            print(classes)
            print(category_index)
            vis_util.visualize_boxes_and_labels_on_image_array(
                image_np,
                np.squeeze(boxes),
                np.squeeze(classes).astype(np.int32),
                np.squeeze(scores),
                category_index,
                use_normalized_coordinates=True,
                line_thickness=8)

            cv2.imshow('object detection', cv2.resize(image_np, (800, 600)))
			#cv2.waitKey(0)
            if cv2.waitKey(25) & 0xFF == ord('q'):
                cv2.destroyAllWindows()
                break

代码中只是添加了摄像头来获取每一帧图像,处理方式和静态的图片差不多,这里就不多说了。这里就不上测试的结果了,大家课可以实际的跑一下程序即可看到结果。


更新 2020.05.04

更新一个单独运行的实时获取摄像头进行检测脚本:

import argparse
import tensorflow as tf
import numpy as np
import time
import cv2 as cv

'''
    video det


    use:

    python Video.py \
        --model=xxx.pb \
        --threshold=0.65
      
'''

# os.environ['CUDA_VISIBLE_DEVICES'] = "0"

parser = argparse.ArgumentParser('TensorFlow')

parser.add_argument('--model', required=True, help='pb file')
parser.add_argument('--threshold', type=float, required=True, help='Detection threshold')
args = parser.parse_args()

# open camera
cap = cv.VideoCapture(0)
if not cap.isOpened():
    print("cannot open camera")
    exit()

# Read the graph.
with tf.gfile.FastGFile(args.model, 'rb') as f:
    graph_def = tf.GraphDef()
    graph_def.ParseFromString(f.read())

config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)

config.gpu_options.allow_growth = True

with tf.Session(config=config) as sess:
    # Restore session
    sess.graph.as_default()
    tf.import_graph_def(graph_def, name='')

    while True:
        ret, image_np = cap.read()
        if not ret:
            print("Cant't receive frame. Exiting....")
            break

        height = image_np.shape[0]
        width = image_np.shape[1]
        channel = image_np.shape[2]

        image_np_expanded = np.expand_dims(image_np, axis=0)

        start_time = time.time()
        # Run the model
        out = sess.run([sess.graph.get_tensor_by_name('num_detections:0'),
                        sess.graph.get_tensor_by_name('detection_scores:0'),
                        sess.graph.get_tensor_by_name('detection_boxes:0'),
                        sess.graph.get_tensor_by_name('detection_classes:0')],
                       feed_dict={'image_tensor:0': image_np_expanded})

        end_time = time.time()
        runtime = end_time - start_time
        print('run time:%f' % (runtime * 1000) + 'ms')

        # Visualize detected bounding boxes.
        num_detections = int(out[0][0])

        for i in range(num_detections):
            classId = int(out[3][0][i])
            score = float(out[1][0][i])

            bbox = [float(v) for v in out[2][0][i]]
            if score > args.threshold:
                x = bbox[1] * width
                y = bbox[0] * height
                right = bbox[3] * width
                bottom = bbox[2] * height
                # draw boxes
                font = cv.FONT_HERSHEY_SIMPLEX
                cv.rectangle(image_np, (int(x), int(y)), (int(right), int(bottom)), (0, 0, 255), thickness=2)
                cv.putText(image_np, '{}:'.format(classId) + str(('%.3f' % score)), (int(x), int(y - 9)), font, 0.6,
                           (0, 0, 255), 1)

                cv.imshow('object detection', cv.resize(image_np, (800, 600)))

        if cv.waitKey(1) == ord('q'):
            break

    cap.release()
    cv.destroyAllWindows()

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

视频目标检测识别 的相关文章

  • Pygame读取MIDI输入

    我参考了Pygame MIDI 文档 https www pygame org docs ref midi html and 这段代码 https stackoverflow com questions 62983509 pygame mi
  • 在 Django 中定义视图和 url。为什么调用函数时不使用括号?

    我已经在经历 Python速成课程 目前正在进行 Django Web应用程序项目 学习日志 阶段 有些东西与我已经学到的相矛盾 views py file from django shortcuts import render def i
  • 打印 scrapy 请求的“响应”

    我正在尝试学习 scrapy 在遵循教程的同时 我正在尝试进行细微的调整 我想简单地从请求中获取响应内容 然后我会将响应传递到教程代码中 但我无法发出请求并获取响应内容 建议就好 from scrapy http import Respon
  • 如何使用pycaffe重构caffe网络

    我想要的是 加载网络后 我将分解一些特定的图层并保存新的网络 例如 原网 数据 gt conv1 gt conv2 gt fc1 gt fc2 gt softmax New net 数据 gt conv1 1 gt conv1 2 gt c
  • Dask DataFrame 的逐行处理

    我需要处理一个大文件并更改一些值 我想做这样的事情 for index row in dataFrame iterrows foo doSomeStuffWith row lol doOtherStuffWith row dataFrame
  • 获取单个方程的脚本

    在文本文件中输入 a 2 8 b 3 9 c 4 8 d 5 9 e a b f c d g 0 6 h 1 7 i e g j f h output i j 期望的输出 输出 2 8 3 9 0 6 4 8 5 9 1 7 如果输入文件名
  • 如何将条目中的部分文本加粗并更改其背景颜色?

    我正在创建一个基于 Tkinter 的 GUI 它有一个 Entry 小部件 我想将其文本的一部分加粗并更改其背景颜色 但我不知道我该怎么做 如果我使用文本小部件 我可以只使用标签 但看起来它们不能与条目小部件一起使用 此代码使用文本小部件
  • Python 中 genfromtxt() 的可变列数?

    我有一个 txt具有不同长度的行的文件 每一行都是代表一条轨迹的一系列点 由于每条轨迹都有自己的长度 因此各行的长度都不同 也就是说 列数从一行到另一行不同 据我所知 genfromtxt Python 中的模块要求列数相同 gt gt g
  • 将 subprocess.Popen 的输出通过管道传输到文件

    我需要启动一些长时间运行的进程subprocess Popen 并希望拥有stdout and stderr从每个自动管道到单独的日志文件 每个进程将同时运行几分钟 我想要两个日志文件 stdout and stderr 每个进程当进程运行
  • 如何在 Windows 上使用 Python 3.6 来安装 Python 2.7

    我想问一下如何使用pip install对于 Python 2 7 当我之前安装并使用 Python 3 6 时 我现在必须使用 Windows 上的 Python 版本 pip install 继续安装 Python 3 6 我需要使用以
  • Python 中的这种赋值方式叫什么? a = b = 真

    我知道关于元组拆包 http docs python org tutorial datastructures html tuples and sequences但是当一行中有多个等号时 这个赋值被称为什么 阿拉a b True 它总是让我有
  • 如何逐像素绘制正方形(Python,PIL)

    在空白画布上 我想使用 Pillow 逐像素绘制一个正方形 我尝试使用 img putpixel 30 60 155 155 55 绘制一个像素 但它没有执行任何操作 from PIL import Image def newImg img
  • FastText - 由于 C++ 扩展未能分配内存,无法加载 model.bin

    我正在尝试使用 FastText Python APIhttps pypi python org pypi fasttext https pypi python org pypi fasttext虽然 据我所知 此 API 无法加载较新的
  • 在pycharm中调试python代码

    这个问题类似于this https stackoverflow com questions 10240018 how to use pycharm to debug python script一 我正在尝试调试pyethapp https
  • Python 矩阵每一行的总和

    lista 1 2 3 4 5 6 7 8 9 print lista def filas lista res for elemento in lista x sum lista elemento res append x print re
  • 使用 lambda 函数更改属性值

    我可以使用 lambda 函数循环遍历类对象列表并更改属性值 对于所有对象或满足特定条件的对象 吗 class Student object def init self name age self name name self age ag
  • Python模块单元测试的最佳文件结构组织?

    遗憾的是 我发现有太多方法可以在 Python 中保存单元测试 而且它们通常没有很好的文档记录 我正在寻找一种 终极 结构 它可以满足以下大部分要求 be discoverable by test frameworks including
  • Google App Engine 中的自定义身份验证

    有谁知道或知道我可以在哪里学习如何使用 Python 和 Google App Engine 创建自定义身份验证流程 我不想使用 Google 帐户进行身份验证 并且希望能够创建自己的用户 如果不是专门针对 Google App Engin
  • 使用“pythonw”(而不是“python”)运行应用程序时找不到模块

    我尝试了这个最小的例子 from flask import Flask app Flask name app route def hello world return Hello World if name main app run deb
  • 使用 numpy 加速 for 循环

    下一个 for 循环如何使用 numpy 获得加速 我想这里可以使用一些奇特的索引技巧 但我不知道是哪一个 这里可以使用 einsum 吗 a 0 for i in range len b a numpy mean C d e f b i

随机推荐

  • 1024程序员节的一些随笔

    转眼间又是一年程序员节 来CSDN已经三年了 之前两年的程序员节都错过 了 所以三年也没混的一个徽章 今年就不要再错过了吧 今年在CSDN是收获满满的一年 自己的文章逐渐被大家所接受 博客也慢慢变的热闹了起来 同时也在CSDN上认识了许多小
  • 排序(三)冒泡排序与快速排序(C语言实现)

    冒泡排序与快速排序都属于交换排序 其中冒泡排序也是十分的出名 实现起来也比较简便 下面一一介绍这两种排序 1 冒泡排序 冒泡排序的意思就是将最大的数沉底 或者最小的数提到最前面来 之后再抛开这个数找次大或此次小的数进行循环 这个过程比较像泡
  • 矩阵分析L2 线性映射与线性变换

    一 线性映射和线性映射 1 定义 线性映射体现在一个向量空间中满足两个合向量的映射等于两个向量映射的和 以及数乘后的映射等于映射后的数乘 线性变换是基于线性映射的一种特例 也就是在自身空间的映射 2 例子 不带乘除的变换 相似变换 微分变换
  • Apache httpd漏洞复现

    文章目录 未知后缀名解析漏洞 多后缀名解析漏洞 启动环境 漏洞复现 换行解析漏洞 启动环境 漏洞复现 未知后缀名解析漏洞 该漏洞与Apache php版本无关 属于用户配置不当造成的解析漏洞 在有多个后缀的情况下 只要一个文件含有 php后
  • osgEarth的Rex引擎原理分析(一零一)TileNode::merge为什么只是不合并最后一个图层

    目标 一零零 中的问题181 因为有些瓦片需要多个图层的数据共同来绘制 如下图 第一层图像数据是不全的 需要第二层的图像数据来填充 绘制时先绘制第二层 再绘制第一层 第一层中没有数据的位置像素点透明 这种情况一般存在于图层边界 osgEar
  • 无效的数值参数“/Wno-cpp”

    问题背景 在windows下执行python setup py build ext inplace 提示命令行 error D8021 无效的数值参数 Wno cpp 仅供参考的解决办法 修改编译参数为如下所示 extra compile
  • 【第三趴】uni-app页面搭建与路由配置(了解工程目录结构、学会搭建页面、配置路由并成功运行)

    文章目录 写在前面 工程结构 新页面呈现 写在最后 本期推荐 写在前面 聚沙成塔 每天进步一点点 大家好我是几何心凉 不难发现越来越多的前端招聘JD中都加入了uni app 这一项 它也已经成为前端开发者不可或缺的一项技能了 所以凉哥为大家
  • 推荐几个不错的前端朋友!

    前端技术日新月异 发展迅速 作为一个与时俱进的前端工程师 需要不断的学习 这里强烈推荐几个前端开发工程师必备的优质公众号 希望对你有所帮助 大家可以像我一样 利用碎片时间阅读这些公众号的文章 Summer 前端充电宝 作者 CUGGZ 掘金
  • Python3,为了“娑娜“,我花费3分钟把lol所有的英雄都下载了。

    协程下载英雄联盟人物皮肤 1 引言 2 代码实战 2 1 网页分析 2 2 代码实战 2 2 1 模块安装 2 2 2 进程 协程 线程区别 2 2 3 代码示例 3 总结 1 引言 小屌丝 鱼哥 快过年 lol不得整起来啊 小鱼 不 我要
  • debug和release的区别

    Debug 和 Release 并没有本质的区别 他们只是VC预定义提供的两组编译选项的集合 编译器只是按照预定的选项行动 如果我们愿意 我们完全可以把Debug和Release的行为完全颠倒过来 当然也可以提供其他的模式 例如自己定义一组
  • MAC下linux双系统的安装

    文章目录 第一步 格式化U盘 第二步 下载系统 这里我选择的是manjaro 第三步 将iso镜像转成dmg格式 第四步 写入镜像 第五步 分空间 第六步 关闭OS X的 SIP保护 第七步 安装refind 第八步 重启按住option键
  • Agisoft Metashape 坐标系选择 坐标转换

    Metashape 坐标系选择 坐标转换 文章目录 Metashape 坐标系选择 坐标转换 前言 一 软件设置 二 坐标系选择 1 有带号坐标系选择 2 无带号坐标系选择 二 坐标转换 以WGS84转CGCS2000投影坐标系为例 1 保
  • 安卓手机刷软路由_华为路由AX3 Pro上手测评:用过最方便的路由器,没有之一...

    都说 科技改变生活 但我总觉着 现如今的人们似乎被数码产品 奴役 了 比如说 之前买过某品牌路由器 设置过程之繁琐 直接让当时是数码小白的我崩溃了 自打那之后 我选购数码产品的标准就改成 方便 这不 最近家里500兆宽带老用户免费升级 5G
  • 真实的程序员的日常

    程序员到底有多累 多辛苦 为什么还有那么多人想转行当程序员 优秀的程序员其实会越来越轻松 计算机世界其实和现实世界很像 解决问题的办法是开放的 而很多时候限制工作量的 其实是想象力 程序员到底有多累 多辛苦 听听前辈们怎么说 IT至今仍是投
  • 数据结构与算法—链表常见面试题(持续更新)

    文章目录 一 链表环 1 判断链表是否有环 题目 方法1 方法2 二 反转链表 1 完全反转链表 题目 方法1 方法2 2 反转部分链表 题目 方法1 参考链接 https blog csdn net Bruce 0712 article
  • Qt读写Excel--QXlsx编译为静态库2

    1 概述 在使用QXlsx时由于源码文件比较多 如果直接加载进项目里面 会增加每次编译的时间 直接将源码加载进项目工程中 会导致项目文件非常多 结构变得更加臃肿 所以在本文中将会将QXlsx编译为静态库再使用 注意 如果是刚接触QXlsx建
  • tomcat运行vue项目,刷新后报404

    背景 打包后的项目发给后台部署到tomcat webapps dist中 刷新页面报404 解析 一般项目放tomcat webapps ROOT 因为里面有默认的WEB INF 若放外面 需修改conf server xml中的配置才会打
  • 【论文笔记】VideoGPT: Video Generation using VQ-VAE and Transformers

    论文标题 VideoGPT Video Generation using VQ VAE and Transformers 论文代码 https wilson1yan github io videogpt index html 论文链接 ht
  • springcloud + feign + seata1.5.2 + nacos

    先介绍一下环境 使用的是SpringCloud Alibaba SpringBoot 2 3 5 RELEASE seata1 5 2 linux环境 首先就是nacos的环境配置 这里就不讲了 seata1 5 2 下载地址 下载中心 下
  • 视频目标检测识别

    之前文章目标检测API 已经介绍过API的基本使用 这里就不赘述了 直接上本次内容的代码了 添加的内容并不多 将测试的test mp4原文件放到models master research object detection路径下 并创建一个