当前位置: 首页 > news >正文

深圳有做网站公司帮别人做数学题赚钱的网站

深圳有做网站公司,帮别人做数学题赚钱的网站,仿微信主题wordpress,抖音广告推广怎么收费这是5幅图#xff0c;加上背景共5类。 可以参考这篇文章https://blog.csdn.net/u012426298/article/details/81232386 对于一个多类别图片数据库#xff0c;每个类别都会有一个class frequency, 该类别像素数目除以数据库总像素数目, 求出所有class frequency 的median 值加上背景共5类。  可以参考这篇文章https://blog.csdn.net/u012426298/article/details/81232386 对于一个多类别图片数据库每个类别都会有一个class frequency, 该类别像素数目除以数据库总像素数目, 求出所有class frequency 的median 值除以该类别对应的frequency 得到weight weightmedian(weights)/weights #coding:utf-8 from __future__ import print_function import os import numpy as np import cv2 w,h512,512 def find_pic(img,array_list,n_class,pixs):img_sum np.sum(img array_list, axis-1)pix_numbersimg_sum.reshape(-1).tolist().count(3)if pix_numbers:pixspix_numbersn_class1return pixs,n_class def compute_class(pixs,n_class):return pixs/(n_class*w*h) def frequence():# images_path ./trainannot_visualimages_path ./visual_examplered np.array([0, 0, 128])yellow np.array([0, 128, 128])green np.array([0, 128, 0])blue np.array([128, 0, 0])back_gro np.array([0, 0, 0])images_list_path [os.path.join(images_path,i) for i in os.listdir(images_path)]n_red0red_pixs0n_yellow 0yellow_pixs 0n_green 0green_pixs 0n_blue 0blue_pixs 0n_back 0back_pixs 0for count,image_path in enumerate(images_list_path):print({}image.format(count))imgcv2.imread(image_path)red_pixs, n_redfind_pic(img,red,n_red,red_pixs)yellow_pixs,n_yellow find_pic(img, yellow,n_yellow,yellow_pixs)green_pixs,n_green find_pic(img, green,n_green,green_pixs)blue_pixs,n_blue find_pic(img, blue,n_blue,blue_pixs)#back_pixs,n_back find_pic(img, back_gro,n_back,back_pixs)print(red_pixs, n_red)print(yellow_pixs,n_yellow)print(green_pixs, n_green)print(blue_pixs, n_blue)print(back_pixs, n_back)f_class_redcompute_class(red_pixs,n_red)f_class_yellow compute_class(yellow_pixs, n_yellow)f_class_green compute_class(green_pixs, n_green)f_class_blue compute_class(blue_pixs, n_blue)f_class_back compute_class(back_pixs, n_back)print(f_class_red,f_class_yellow,f_class_green,f_class_blue,f_class_back)f_class[f_class_red,f_class_yellow,f_class_green,f_class_blue,f_class_back]f_class_mediannp.median(np.array(f_class))print(f_class_median)print(f_class_median/np.array(f_class)) if __name__ __main__:frequence()这样可以保证占比小的class, 权重大于1 占比大的class 权重小于1 达到balancing的效果.
http://www.zqtcl.cn/news/507897/

相关文章:

  • 做网站需要注意的问题seo推广代运营
  • 采购网站大全wordpress decorum
  • wordpress建站教程道一网页效果图素材
  • 广州网站开发哪家专业免费咨询怀孕医生
  • 洛阳网站的优化阿里云购买域名后怎么建网站
  • 我是做环保类产品注册哪些浏览量大的网站推销自己的产品比较好呢网站功能模块设计
  • 叫人做网站多少钱百度免费网站怎样建设
  • 本地南通网站建设新手编程入门先学什么
  • asp网站开发的背景与环境久久建筑网会员
  • 河北省住房建设厅官方网站个人计算机做服务器建网站
  • 上海自助建站费用页游网站
  • 浙江省住建厅网站沈阳网站建设专家
  • 基础建设文本网站施工企业在施工过程中发现设计文件和图纸有差错的应当
  • 做互联网交易网站的条件17网站一起做网店揭阳
  • 做公司网站合同asp.net sql server网站建设 pdf
  • 建筑兼职网站天津网站优化公司哪家好
  • 怎么做网站设计商城型网站开发网站建设
  • 建设网站目录帮别人做网站要投资吗
  • 网站meta 优化建议桥梁建设设计网站
  • 网站建设 甘肃wordpress rss去掉
  • 网站安全检测大连网龙建站优化推广
  • 人才网官方网站公众号排名优化软件
  • 淘宝返利网站建设软件开发哪里学好
  • 烟台网站制作公司如何注册国外网站
  • discuz企业网站网站可以做音频线吗
  • 怎样制作网站教程哪家好制作网页的的网站
  • 网站没有织梦后台无锡seo公司网站
  • 哈尔滨住房和城乡建设厅网站公司网站建设 费用入账
  • 网站图片缩略图t恤图案设计网站
  • 对招聘网站页面设计做建议网站流量 转化率