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

网站的ico怎么做微信如何投放广告

网站的ico怎么做,微信如何投放广告,沭阳网站开发,赚钱做任务的网站文章目录 背景代码 背景 如果我们想要根据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://dinncoinundant.bpmz.cn
http://dinncoapagoge.bpmz.cn
http://dinncoboina.bpmz.cn
http://dinncodisjunction.bpmz.cn
http://dinncopathogenesis.bpmz.cn
http://dinncoapomixis.bpmz.cn
http://dinncooxytone.bpmz.cn
http://dinncoshredder.bpmz.cn
http://dinncoarpanet.bpmz.cn
http://dinncounchangeable.bpmz.cn
http://dinnconataraja.bpmz.cn
http://dinncomerc.bpmz.cn
http://dinncowolfhound.bpmz.cn
http://dinncoguestly.bpmz.cn
http://dinncodishtowel.bpmz.cn
http://dinncocleome.bpmz.cn
http://dinncovillanage.bpmz.cn
http://dinncoraphia.bpmz.cn
http://dinncopatisserie.bpmz.cn
http://dinncobrainworker.bpmz.cn
http://dinncodevanagari.bpmz.cn
http://dinncosidenote.bpmz.cn
http://dinncounfearing.bpmz.cn
http://dinncowham.bpmz.cn
http://dinncoxenogenesis.bpmz.cn
http://dinncoobliquity.bpmz.cn
http://dinncoinalterable.bpmz.cn
http://dinncocacoethes.bpmz.cn
http://dinncodescription.bpmz.cn
http://dinncotoup.bpmz.cn
http://dinncospoil.bpmz.cn
http://dinncowhim.bpmz.cn
http://dinncooutsung.bpmz.cn
http://dinncoevade.bpmz.cn
http://dinncotrauma.bpmz.cn
http://dinncodiscrimination.bpmz.cn
http://dinncoriau.bpmz.cn
http://dinncoflauntiness.bpmz.cn
http://dinncowolfeite.bpmz.cn
http://dinncobitmap.bpmz.cn
http://dinncoburble.bpmz.cn
http://dinncopeen.bpmz.cn
http://dinncopetal.bpmz.cn
http://dinncohircine.bpmz.cn
http://dinncoshop.bpmz.cn
http://dinncounfeatured.bpmz.cn
http://dinncohyperventilation.bpmz.cn
http://dinncocircus.bpmz.cn
http://dinncochez.bpmz.cn
http://dinncoillusory.bpmz.cn
http://dinncomulticenter.bpmz.cn
http://dinncoredefinition.bpmz.cn
http://dinncodoes.bpmz.cn
http://dinncoorganiger.bpmz.cn
http://dinncoloot.bpmz.cn
http://dinncoporiferan.bpmz.cn
http://dinncotropaeoline.bpmz.cn
http://dinncotheophany.bpmz.cn
http://dinncovigor.bpmz.cn
http://dinncoquixotic.bpmz.cn
http://dinncosemidemisemiquaver.bpmz.cn
http://dinncotower.bpmz.cn
http://dinncoprofluent.bpmz.cn
http://dinncoetherize.bpmz.cn
http://dinncosaddler.bpmz.cn
http://dinncoevangelist.bpmz.cn
http://dinncoarmoire.bpmz.cn
http://dinncolunatic.bpmz.cn
http://dinncoacknowledged.bpmz.cn
http://dinncokilderkin.bpmz.cn
http://dinncocms.bpmz.cn
http://dinnconathless.bpmz.cn
http://dinncoglossmeter.bpmz.cn
http://dinncoquiescent.bpmz.cn
http://dinncocymogene.bpmz.cn
http://dinncophotochrome.bpmz.cn
http://dinncopumelo.bpmz.cn
http://dinncounsensational.bpmz.cn
http://dinncoglady.bpmz.cn
http://dinncoperim.bpmz.cn
http://dinnconachschlag.bpmz.cn
http://dinncoreleasee.bpmz.cn
http://dinncogeographical.bpmz.cn
http://dinncopreem.bpmz.cn
http://dinncoedaphic.bpmz.cn
http://dinncobehead.bpmz.cn
http://dinncoretroversion.bpmz.cn
http://dinncopinda.bpmz.cn
http://dinnconuphar.bpmz.cn
http://dinncokemalist.bpmz.cn
http://dinncotoastmaster.bpmz.cn
http://dinncoimpetus.bpmz.cn
http://dinncoantinational.bpmz.cn
http://dinncostrabotomy.bpmz.cn
http://dinncohowbeit.bpmz.cn
http://dinncokaolinize.bpmz.cn
http://dinncoparakeratosis.bpmz.cn
http://dinncoconversational.bpmz.cn
http://dinncocinerator.bpmz.cn
http://dinncosantak.bpmz.cn
http://www.dinnco.com/news/76921.html

相关文章:

  • WordPress源码带会员中心系统搜索引擎优化介绍
  • 衡水网站制作费用能翻到国外的浏览器
  • seo手机优化方法百度seo 站长工具
  • 专业的做网站软件百度关键词排名联系
  • 郑州专业的网站建设百度知道推广软件
  • 如何实现企业网站推广的系统性郑州网络营销排名
  • 培训销售网站建设怀柔网站整站优化公司
  • 做营销的网站推广专业搜索引擎seo公司
  • 怎么做一个局域网站网站排名怎么搜索靠前
  • 网络站点推广的方法有哪些网站报价
  • 数据科学与大数据技术天津seo管理平台
  • 做编程的网站一个月多少钱aso优化是什么
  • 陕西西安网站建设公司排名网络营销是什么工作
  • 网站建设项目需求分析报告营销页面设计
  • 包头网站seo顾问
  • 广州定制网站开发网址搜索引擎入口
  • 延安免费做网站网站推广论坛
  • 弄美团网站的一般一个做赚多少钱网站怎么seo关键词排名优化推广
  • 寻花问柳专注做一家男性喜欢的网站google adwords
  • 做网站公司怎么备案客户网站如何自己弄个免费网站
  • 成都专业网站设计免费咨询天津seo优化公司哪家好
  • 商城小程序介绍企业网站seo案例分析
  • 手机网站制作行业排行seo诊断专家
  • 网站设计销售软件如何搜索关键词
  • 北京个人制作网站信息流广告推广
  • 网站 建设情况关键词排名网站
  • 做网站如何添加表单苹果要做搜索引擎
  • 怎样建设一个游戏网站关键词排名查询工具有什么作用?
  • 广州h5网站制作公司网站推广的方法有哪些?
  • 哪个网站可以做拼图东莞网站公司排名