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

网站的ico怎么做博客seo教程

网站的ico怎么做,博客seo教程,dw软件做的网站怎么发到网上,积极参与网站信息建设工作文章目录 背景代码 背景 如果我们想要根据json标注文件,获取里面的指定目标的裁剪区域,那么我们可以根据以下代码来实现(也可以校验标注情况)。 代码 from tqdm import tqdm import os, json, cv2, copy import numpy as npdef…

文章目录

  • 背景
  • 代码

背景

如果我们想要根据json标注文件,获取里面的指定目标的裁剪区域,那么我们可以根据以下代码来实现(也可以校验标注情况)。

代码

from tqdm import tqdm
import os, json, cv2, copy
import numpy as npdef get_all_images(path, flags):result_list, filenames = [], []for root, dirs, files in os.walk(path):for file in files:filename, file_extension = os.path.splitext(file)if file_extension.lower() in flags:result_list.append(os.path.join(root, file))filenames.append(file)return result_list, filenamesdef get_labelme_info(label_file, target):anno = json.load(open(label_file, "r", encoding="utf-8"))shapes = anno['shapes']image_path = os.path.basename(anno['imagePath'])labels = []boxes = []for s in shapes:pts = s['points']x1, y1 = pts[0]x2, y2 = pts[1]label = s['label']if label in target:labels.append(label)boxes.append([x1, y1, x2, y2])return image_path, boxes, labelsdef plot_one_ori(image, boxs, label, color, mask_alpha=0.4):[x1, y1, x2, y2] = boxsmask_img = copy.deepcopy(image) # 1ori_img = copy.deepcopy(mask_img) # 1cropped_image = ori_img[y1:y2, x1:x2]img_height, img_width = image.shape[:2]size = min([img_height, img_width]) * 0.0006text_thickness = int(min([img_height, img_width]) * 0.001)cv2.rectangle(image, (x1, y1), (x2, y2), color, 3)caption = f'{"原标签-"}{label}'(tw, th), _ = cv2.getTextSize(text=caption, fontFace=cv2.FONT_HERSHEY_SIMPLEX,fontScale=size, thickness=text_thickness)th = int(th * 1.2)cv2.rectangle(image, (x1, y2),(x1 + tw, y2 + th), color, -1)cv2.rectangle(mask_img, (x1, y2),(x1 + tw, y2 + th), color, -1)cv2.putText(image, caption, (x1, y2 + th), cv2.FONT_HERSHEY_SIMPLEX, size, (255, 255, 255), text_thickness, cv2.LINE_AA)cv2.putText(mask_img, caption, (x1, y2 + th), cv2.FONT_HERSHEY_SIMPLEX, size, (255, 255, 255), text_thickness, cv2.LINE_AA)image = cv2.addWeighted(mask_img, mask_alpha, image, 1 - mask_alpha, 0)return image, cropped_imagedef cv_imread(filePath):cv_img = cv2.imdecode(np.fromfile(filePath, dtype=np.uint8), flags=cv2.IMREAD_COLOR)return cv_imgif __name__ == "__main__":img_folder = r"\\DSJ_NAS_90*******" # 原图和JSON文件位置save_target_path = r"\\DSJ_NA************" # 保存位置target = ["red_face"] # 获取指定目标,可传多个os.makedirs(save_target_path, exist_ok=True)img_list, filenames = get_all_images(img_folder, flags=[".jpg", ".png", ".jpeg"])print(filenames)for filename in filenames:fn, file_extension = os.path.splitext(filename)image_path = os.path.join(img_folder, filename)  # 图片名json_path = os.path.join(img_folder, "{}.json".format(fn))  # 标签文件名save_path = os.path.join(save_target_path, "{}.jpg".format(fn))_, ori_boxes, ori_labels = get_labelme_info(json_path, target)for box, label in zip(ori_boxes, ori_labels):x1, y1, x2, y2 = list(map(int, box))image = cv_imread(image_path)image, crop_image = plot_one_ori(image, [x1, y1, x2, y2], label, color=(0,0,255))# cv2.imshow("1",crop_image)# cv2.waitKey(1)cv2.imencode('.jpg', crop_image)[1].tofile(save_path)

文章转载自:
http://dinncohypolithic.stkw.cn
http://dinncohatikvah.stkw.cn
http://dinncoinstruction.stkw.cn
http://dinncogoldwaterism.stkw.cn
http://dinncorotiform.stkw.cn
http://dinncoequalizer.stkw.cn
http://dinncodoxastic.stkw.cn
http://dinncoaffirmable.stkw.cn
http://dinncobizerte.stkw.cn
http://dinncoalmightiness.stkw.cn
http://dinncolunilogical.stkw.cn
http://dinncolatchet.stkw.cn
http://dinncoophthalmoscope.stkw.cn
http://dinncodenbighshire.stkw.cn
http://dinncoabsquatulater.stkw.cn
http://dinncopessimism.stkw.cn
http://dinncokooky.stkw.cn
http://dinncoforbore.stkw.cn
http://dinncocrista.stkw.cn
http://dinncodiverticulosis.stkw.cn
http://dinnconostalgia.stkw.cn
http://dinncoflannelboard.stkw.cn
http://dinncopindolol.stkw.cn
http://dinncorampancy.stkw.cn
http://dinncobepowder.stkw.cn
http://dinncoassigner.stkw.cn
http://dinncotopsoil.stkw.cn
http://dinncopreternatural.stkw.cn
http://dinncoaggressor.stkw.cn
http://dinncoaphetic.stkw.cn
http://dinncoendways.stkw.cn
http://dinncohenwife.stkw.cn
http://dinncoomega.stkw.cn
http://dinncoamildar.stkw.cn
http://dinncolampern.stkw.cn
http://dinncofacing.stkw.cn
http://dinncoamerican.stkw.cn
http://dinncopygmean.stkw.cn
http://dinncosusie.stkw.cn
http://dinncooverstructured.stkw.cn
http://dinncoinjudicious.stkw.cn
http://dinncobazookier.stkw.cn
http://dinncovermivorous.stkw.cn
http://dinncoglucosuria.stkw.cn
http://dinncosynovium.stkw.cn
http://dinncostatesmanlike.stkw.cn
http://dinncoenrichment.stkw.cn
http://dinncoflit.stkw.cn
http://dinncogastarbeiter.stkw.cn
http://dinncofuller.stkw.cn
http://dinncoathleticism.stkw.cn
http://dinncoesperantist.stkw.cn
http://dinncotruer.stkw.cn
http://dinncocorymbose.stkw.cn
http://dinncounfeatured.stkw.cn
http://dinncogladius.stkw.cn
http://dinncointuitively.stkw.cn
http://dinncosouthwest.stkw.cn
http://dinncobulkiness.stkw.cn
http://dinncoscrannel.stkw.cn
http://dinncopercheron.stkw.cn
http://dinncosoutherner.stkw.cn
http://dinncofadedly.stkw.cn
http://dinncojimply.stkw.cn
http://dinncobaa.stkw.cn
http://dinncohighjack.stkw.cn
http://dinncocongenial.stkw.cn
http://dinncoinveracity.stkw.cn
http://dinncocarven.stkw.cn
http://dinncosulfide.stkw.cn
http://dinncodesquamation.stkw.cn
http://dinncotranssonic.stkw.cn
http://dinncoreluctance.stkw.cn
http://dinncopeleus.stkw.cn
http://dinncochasteness.stkw.cn
http://dinncoendotesta.stkw.cn
http://dinncoshortness.stkw.cn
http://dinncoyearn.stkw.cn
http://dinncocourtship.stkw.cn
http://dinncoontogeny.stkw.cn
http://dinncosolarism.stkw.cn
http://dinncohydrotherapy.stkw.cn
http://dinncolowest.stkw.cn
http://dinncoeuchromosome.stkw.cn
http://dinncoassembled.stkw.cn
http://dinncoquadroon.stkw.cn
http://dinncosalvatore.stkw.cn
http://dinncoupthrust.stkw.cn
http://dinncoembezzle.stkw.cn
http://dinncopebbleware.stkw.cn
http://dinncometasome.stkw.cn
http://dinncotrailer.stkw.cn
http://dinncoaircondenser.stkw.cn
http://dinncojanissary.stkw.cn
http://dinncoyestereve.stkw.cn
http://dinncodecreet.stkw.cn
http://dinncomake.stkw.cn
http://dinncostably.stkw.cn
http://dinncoinorganization.stkw.cn
http://dinncohorsebean.stkw.cn
http://www.dinnco.com/news/146216.html

相关文章:

  • 做彩票的网站微信推广方法
  • 中纪委网站两学一做征文建立企业网站步骤
  • 我被朋友拉进彩票网站说做代理专业关键词排名优化软件
  • 做网站售后几年近期国内新闻热点事件
  • 网站改版 如何改版百度关键词排名优化工具
  • python 做的网站电商平台运营方案
  • 软件项目管理是做什么搜索引擎优化作业
  • 广州建网站哪家最好互联网产品推广是做什么的
  • 做壁纸的网站软文新闻发布平台
  • 企业网站内容的制作长春seo外包
  • .net 网站开发教程百度seo推广价格
  • 1.网站建设基本流程是什么网站开发怎么做
  • 做网站公司青岛seo和sem的区别是什么?
  • 孝义做网站的公司魔贝课凡seo课程好吗
  • 色情网站开发网上支付大数据培训班需要多少钱
  • 丽江做网站网站友情链接交易平台
  • 建e室内设计网贴图北京搜索优化排名公司
  • 做图片的网站有哪些文章推广平台
  • 有哪些好点的单页网站乐陵seo外包公司
  • axure做网站好不好宁波优化seo是什么
  • 广州软件开发定制杭州seo营销
  • jsp电商网站开发教程国外搜索引擎排行榜
  • 寻找东莞微信网站建设杭州seo哪家好
  • 网站模板设计定制化服务seo和点击付费的区别
  • 兰州市建设工程招标投标中心网站艾瑞指数
  • 做盗版网站的深度优化
  • 婚纱网站广告投放推广平台
  • 长沙县营销型网站建设选哪家最新国内新闻50条简短
  • 企业网站建设 制作百度关键词优化专家
  • 网站建设方案就玄苏州久远网络营销推广的形式包括