登录
首页 » python » python hog 特征提取

python hog 特征提取

于 2022-04-02 发布 文件大小:1.42 kB
0 115
下载积分: 2 下载次数: 1

代码说明:

import cv2 import numpy as np import math import matplotlib.pyplot as plt class Hog_descriptor(): def __init__(self, img, cell_size=16, bin_size=8): self.img = img self.img = np.sqrt(img / np.max(img)) self.img = img * 255 self.cell_size = cell_size self.bin_size = bin_size self.angle_unit = 360 / self.bin_size # assert type(self.bin_size) == int, "bin_size should be integer," # assert type(self.cell_size) == int, "cell_size should be integer," # assert type(self.angle_unit) == int, "bin_size should be divisible by 360" def extract(self): height, width = self.img.shape gradient_magnitude, gradient_angle = self.global_gradient() gradient_magnitude = abs(gradient_magnitude) cell_gradient_vector = np.zeros((int(height / self.cell_size), int(width / self.cell_size), self.bin_size)) for i in rang

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • MintPy-master
    说明:  InSAR代码,用于进行InSAR处理。Python代码(Is the InSAR code for InSAR processing. Python code)
    2020-06-17 05:40:02下载
    积分:1
  • Python深度学习
    说明:  本书由Keras之父、现任Google人工智能研究员的弗朗索瓦·肖菜(Francois Chollet)执笔,详尽介绍了用Python和Keras进行深度学习的探索实践,涉及计算机视觉、自然语言处理、生成式模型等应用。 书中包含30多个代码示例,步骤讲解详细透彻。由于本书立足于人工智能的可达性和大众化,读者无须具备机器学习相关背景知识即可展开阅读。在学习完本书后,读者将具备搭建自己的深度学习环境、建立图像识别模型、生成图像和文字等能力。 本拐适合从事大数据及机器学习领域工作,并对深度学习感兴趣的各类读者。(This book is written by Francois Chollet, the father of keras and currently a researcher of Google artificial intelligence. It introduces in detail the exploration and practice of deep learning with Python and keras, involving computer vision, natural language processing, generative model and other applications. The book contains more than 30 code examples, the steps to explain in detail. Because this book is based on the accessibility and popularity of artificial intelligence, readers can read without the background knowledge of machine learning. After learning this book, readers will have the ability to build their own deep learning environment, establish image recognition model, and generate images and characters. It is suitable for all kinds of readers who are engaged in big data and machine learning and are interested in deep learning.)
    2020-11-25 22:29:10下载
    积分:1
  • users_spider_new
    微博爬虫,用于爬去某地点附近发生的签到事件,并将数据写入xls文件(Microblogging reptile, used to climb to a place near the attendance event, and write data to the xls file)
    2016-12-26 12:28:54下载
    积分:1
  • 第5章
    说明:  在许多情况下,利用深度学习算法搭建的神经网络模型都需妥进行某 种形式的优化。 这非常重要,只有经过优化的网络,才能在训练之后达到 不错的解决问题的效果。 优化的最直接目的就是使参数更加准确地更新。 一般神经网络的训练过程大致可以分为两个阶段:第一个阶段先通过 前向传播算法计算得到预测值,并将预测值和真实值做对比,得出两者之 间的差距;在第二个阶段,通过反向传播算法计算损失函数对每一个参数 的梯度,再根据梯度和学习率使用梯度下降算法更新每一个参数。(In many cases, the neural network model built by deep learning algorithm needs to be optimized in some form. This is very important, only after the optimization of the network, in order to achieve good results in solving problems after training. The most direct purpose of optimization is to update parameters more accurately. The training process of general neural network can be roughly divided into two stages: in the first stage, the predicted value is calculated by the forward propagation algorithm, and the difference between the predicted value and the real value is obtained; in the second stage, the loss function is calculated by the back-propagation algorithm for each parameter According to the gradient and learning rate, the gradient descent algorithm is used to update each parameter.)
    2020-09-14 16:18:29下载
    积分:1
  • social-lstm-tf-master
    social lstm tensorflow
    2017-09-15 09:22:46下载
    积分:1
  • mdp2
    利用马尔可夫决策过程求解动态规划问题,希望对大家有所帮助(Using Markov Decision Process to Solve Dynamic Programming Problem, I hope it will be helpful to all of you.)
    2019-06-24 15:37:52下载
    积分:1
  • alien_invasion
    说明:  python项目之外星人入侵,制作小型游戏项目,zszs(alien_invasion,zszszsszszsszszszszzssz)
    2019-11-29 12:20:38下载
    积分:1
  • LM_method
    说明:  LM莱文博格马夸特优化算法,python语言(this is a file of LM algorithm which was wroten by python language)
    2020-03-02 19:37:17下载
    积分:1
  • Silabs SI4703 FM收音机
    #感谢弥敦Seidle和他的素描的示例代码在SparkFun!没有它我会失去。
    2022-05-17 01:34:03下载
    积分:1
  • pytorch-tutorial-master
    pytorch的tutorial,介绍了pytorch的基本功能和应用,附有使用手册(the tutorial of pytorch that introduces the basic function and the application of pytorch)
    2018-05-23 20:16:35下载
    积分:1
  • 696518资源总数
  • 105958会员总数
  • 18今日下载