【教学类-18-04】20240508《蒙德里安“黑白格子画” 七款图案挑选》

news2024/9/28 22:04:41

背景需求

最近有2位客户买了蒙德里安黑白格子画的素材,其中一位问是否是1000张。

【教学类-18-03】20240508《蒙德里安“红黄蓝黑格子画”-A4横版》(大小格子)_processing简单图形画蒙德里安-CSDN博客文章浏览阅读1.1k次,点赞35次,收藏7次。【教学类-18-03】20240508《蒙德里安“红黄蓝黑格子画”-A4横版》(大小格子)_processing简单图形画蒙德里安https://blog.csdn.net/reasonsummer/article/details/138568655

实际上我只做了“蒙德里安学具”用到的4款图形的图片数量。每套最多30张精选图片。

因为随机生成的线条图并不都符合我的教学需要(色块不能太大-涂色太累,边缘部分不能有黑线,与边线融合会变粗等),需要手动挑选,所以我每种选了20份,绝对没有1000份

第1款:正方15:15

第2款:长方15:21

第3款:长方21:15

 第4款:正方5:21


【教学类-18-03】20240508《蒙德里安“红黄蓝黑格子画”-A4横版》(大小格子)_蒙德里安格子画色值-CSDN博客文章浏览阅读1.1k次,点赞35次,收藏7次。【教学类-18-03】20240508《蒙德里安“红黄蓝黑格子画”-A4横版》(大小格子)_蒙德里安格子画色值https://blog.csdn.net/reasonsummer/article/details/138568655

今天我想用批量的方式制作['小正方','长条','半竖','半横','全竖','全横','全正']7款不同尺寸的蒙德里安黑白格子学具。

一共写了三个代码

一、根据不同尺寸生成7款图片(最后手动挑选)

'''
目的:蒙德里安(大小不规律格子)白色
作者:AI对话大师
时间:2024年5月8日

第一步:手选图片
目的:蒙德里安(大小不规律格子)白色 7款大小-
作者:AI对话大师
时间:2024年9月28日
'''

from PIL import Image, ImageDraw
import random,os


N=['小正方','长条','半竖','半横','全竖','全横','全正']
print(len(N))
l=[[1500,1500],[2900,500],[1500,2100],[2100,1500],[2100,2900],[2900,2100],[2100,2100]]
# # 正方
# width= 1500
# height= 1500
# # 长条
# width=  2738
# height= 520
# 半竖
# width= 1500
# height= 2100
# # 半横
# width= 2100
# height= 1500
# # 全横
# width= 2970
# height= 2100
# # 全竖
# width= 2100
# height= 2970


n=2
for w in range(len(N)):
   

    outline_width = 30 # 外框线宽度
    for xx in range(600):
        # 创建一个新的空白图片
        
        # width, height = 2100, 1500
        min_rect_size = 200
        width=int(l[w][0])
        height=int(l[w][1])

        image = Image.new('RGB', (width, height), color=(255, 255, 255))
        draw = ImageDraw.Draw(image)

        # 已放置的矩形列表
        placed_rects = []

        # 尝试放置多个不重叠的矩形
        num_rects = n # 尝试放置的矩形数量
        # 控制3个红、3个黄、3个蓝、3个黑
        colors = [(255, 255, 255)]    # 白色
        # colors = [(255, 0, 0), (255, 255, 0), (0, 0, 255), (0, 0, 0),(255, 255, 255)]  # 颜色列表


        # 左上角向左 左下角向左
        def extend_line_to_boundary_left(start_x, start_y, direction_x, stop_color):
            x = start_x
            y = start_y
            while 0 <= x <= width and image.getpixel((x, y)) != stop_color:
                x += direction_x
            return x

        # 右上角向右 右下角向右
        def extend_line_to_boundary_right(start_x, start_y, direction_x, stop_color, width, image):
            x = start_x
            y = start_y
            while 0 <= x < width and image.getpixel((x, y)) != stop_color:
                x += direction_x
            return x

        # 左上角向上 右上角向上
        def extend_line_to_boundary_up(start_x, start_y, direction_y, stop_color, height, draw):
            x = start_x
            y = start_y
            while 0 <= y < height:
                try:
                    if draw.getpixel((x, y)) == stop_color:
                        break
                except IndexError:
                    break
                y += direction_y
            return y

        # 左下角向下 右下角向下
        def extend_line_to_boundary_down(start_x, start_y, direction_y, stop_color, height, draw):
            x = start_x
            y = start_y
            while 0 <= y < height:
                try:
                    if draw.getpixel((x, y)) == stop_color:
                        break
                except IndexError:
                    break
                y += direction_y
            return y

        for _ in range(num_rects):
            success = False
            while not success:
                
                # 随机生成矩形位置和大小
                left = random.randint(0, width - min_rect_size)
                top = random.randint(0, height - min_rect_size)
                # right = left + random.randint(min_rect_size, width - left)
                # bottom = top + random.randint(min_rect_size, height - top)
                right = left + random.randint(min_rect_size, width - left)
                bottom = top + random.randint(min_rect_size, height - top)

                # max_rect_size

                # 检查新矩形是否与已放置的矩形重叠
                for rect in placed_rects:
                    if left < rect[2] and right > rect[0] and top < rect[3] and bottom > rect[1]:
                        # 如果重叠,则重新生成新的矩形位置和大小
                        break
                else:
                    # 如果没有重叠,则绘制矩形并添加到已放置的矩形列表
                    color = random.choice(colors)  # 随机选择颜色里的一个白色
                    
                    outline_color = (0, 0, 0)  # 外框线颜色为黑色
                    
                    draw.rectangle([(left, top), (right, bottom)], fill=color, outline=(0, 0, 0),width=outline_width)
                    placed_rects.append((left, top, right, bottom))
                    success = True

                    # 延长矩形边界至画布边框
                    # 延长矩形边界至画布边框
                    # draw.line([(left, top), (0, top)], fill=outline_color, width=outline_width)
                    # draw.line([(right, top), (width, top)], fill=outline_color, width=outline_width)
                    # draw.line([(right, bottom), (width, bottom)], fill=outline_color, width=outline_width)
                    # draw.line([(left, bottom), (0, bottom)], fill=outline_color, width=outline_width)
                    # draw.line([(left, top), (left, 0)], fill=outline_color, width=outline_width)
                    # draw.line([(right, top), (right, 0)], fill=outline_color, width=outline_width)
                    # draw.line([(right, bottom), (right, height)], fill=outline_color, width=outline_width)
                    # draw.line([(left, bottom), (left, height)], fill=outline_color, width=outline_width)

                
                    # 检测矩形左下角的坐标(left-1、bottom-15),向下垂直延伸画一根黑色线条
                    y = extend_line_to_boundary_down(left - 1, bottom - 15, 1, outline_color, height, image)
                    draw.line([(left + 15, bottom - 15), (left + 15, y)], fill=outline_color, width=outline_width)
                    

                    #  # 检测矩形左上角的坐标(left-1、top+15),向上垂直延伸画一根黑色线条
                    y = extend_line_to_boundary_up(left-1, top+15, -1, outline_color, height, image)
                    draw.line([(left +15, top + 15), (left +15, y)], fill=outline_color, width=outline_width)

                    # 检测矩形左上角的坐标(left-1、top+15),向左侧水平延伸画一根黑色线条
                    x = extend_line_to_boundary_left(left -1, top + 15, -1, outline_color)
                    draw.line([(left - 1, top + 15), (x, top + 15)], fill=outline_color, width=outline_width)               
                
                    # 检测矩形右上角的坐标(right+1、top+15),向上垂直延伸画一根黑色线条
                    y = extend_line_to_boundary_up(right + 1, top + 15, -1, outline_color, height, image)
                    draw.line([(right -15, top + 15), (right -15, y)], fill=outline_color, width=outline_width)

                    # 检测矩形左下角的坐标(left-1、top+15),向左侧水平延伸画一根黑色线条
                    x = extend_line_to_boundary_left(left -1, bottom - 15, -1, outline_color)
                    draw.line([(left - 1, bottom - 15), (x, bottom - 15)], fill=outline_color, width=outline_width)

                # # 检测矩形右上角的坐标(right+1、top+15),向右侧水平延伸画一根黑色线条
                    
                #      # 检测矩形左下角的坐标(left-1、bottom-15),向下垂直延伸画一根黑色线条
                #     y = extend_line_to_boundary_down(left - 1, bottom - 15, 1, outline_color, height, image)
                #     draw.line([(left + 15, bottom - 15), (left + 15, y)], fill=outline_color, width=outline_width)

                    x = extend_line_to_boundary_right(right + 1, top + 15, 1, outline_color, width, image)
                    draw.line([(right + 1, top + 15), (x, top + 15)], fill=outline_color, width=outline_width)              

                    # 检测矩形右下角的坐标(right+1、bottom-15),向下垂直延伸画一根黑色线条
                    y = extend_line_to_boundary_down(right + 1, bottom - 15, 1, outline_color, height, image)
                    draw.line([(right - 15, bottom - 15), (right - 15, y)], fill=outline_color, width=outline_width)

                    # 检测矩形右下角的坐标(right+1、top+15),向右侧水平延伸画一根黑色线条
                    x = extend_line_to_boundary_right(right + 1, bottom - 15, 1, outline_color, width, image)
                    draw.line([(right + 1, bottom - 15), (x, bottom - 15)], fill=outline_color, width=outline_width)     
                        
        # 显示图片(如果你使用的是图形界面环境)
        # image.show()
        path=r'C:\Users\jg2yXRZ\OneDrive\桌面\蒙德里安1000张挑选\01一千张原始图需要挑选'
        new_path=path+fr'\{N[w]}'
        os.makedirs(new_path,exist_ok=True)
        image.save(new_path+fr'\{xx:05d}.png')

生成了7种不同尺寸的黑白格子图

手动挑选适合涂色的画面

1、靠四条边上不能有线条(插入word模板,有黑色边框会导致线条加粗)

2、格子不能太大或太小(涂色面积大,费劲))

挑选后,不要图片都删除

500张图挑选出平均生成40张图

我想每种凑100张,所以再生成一次600张

花了一个下午把所有图片都挑选到100张,

感觉这样太累了,还是要在写代码的时候,就控制好两个正方形的位置,不让它太靠近画布的边缘,让两个正方形位置靠近一点。

第二步:给每张图片左上角画“学号框”

'''
第二步
蒙德里安黑白格子画-7款大小图片批量插入学号框
星火讯飞、阿夏
20240928
'''

from PIL import Image, ImageDraw
import os,time
import shutil

N=['小正方','长条','半竖','半横','全竖','全横','全正']

# 图片文件夹路径
path =r'C:\Users\jg2yXRZ\OneDrive\桌面\蒙德里安1000张挑选'
folder_path=path+r'\01一千张原始图需要挑选'

import shutil

folder_path = path+r'\01一千张原始图需要挑选'
new_path = path+r'\02挑选后添加学号'
# 复制一份
if not os.path.exists(new_path):
    shutil.copytree(folder_path, new_path)

time.sleep(1)

# import os
# from PIL import Image

import os
import glob

root_folder = new_path
image_extensions = ['*.jpg', '*.jpeg', '*.png', '*.gif']
images = []

for folder in os.listdir(root_folder):
    print(folder)    # 全横
    select_folder = os.path.join(root_folder, folder, '挑选')
    print(select_folder)
    # C:\Users\jg2yXRZ\OneDrive\桌面\蒙德里安1000张挑选\02挑选后添加学号\长条\选择
    for f in os.listdir(select_folder):
        # for ext in image_extensions:
            # images.extend(glob.glob(os.path.join(select_folder, ext)))
        image_path_all=os.path.join(select_folder, f)



        image_path = os.path.join(image_path_all)
        image = Image.open(image_path)
        draw = ImageDraw.Draw(image)

        # 定义边框宽度和颜色
        border_width = 3
        border_color = (180, 180, 180)  # 黑色

        # 定义填充颜色
        fill_color = (255, 255, 255)  # 白色

        # 插入边框和填充正方形
        x = 10
        y = 10
        size = 200
        draw.rectangle([(x, y), (x + size, y + size)], fill=fill_color, outline=border_color, width=border_width)

        # 保存修改后的图片
        new_image_path = os.path.join(image_path_all)
        image.save(new_image_path)

本代码把“01一千张文件夹”复制一份变成“02挑选后”

然后把02里面的所有图片左上角加上学号框

长方1
 

长方2

正方

长条

左上角的学号都定好了,起到图纸方向定位的作用(不过孩子操作时,会把纸张旋转各种角度涂色,学号会在格子的左或右侧,算了,只要有学号,能便于区分物主就可以了)

第三步:”不同文件大小对应不同的word模板

七个文件夹图片对应用七个word模版

边框6磅

代码展示(生成时长很长)

'''
第三步
蒙德里安黑白格子画-7款大小图片批量插入word,制作PDF,并打包
星火讯飞、阿夏
20240928

'''
import glob
import shutil
from docx import Document   
import os,time,random
from docx import Document
from docx.shared import Cm
from docx2pdf import convert
from PyPDF2 import PdfMerger
from datetime import datetime
from PIL import Image, ImageDraw

# 图片文件夹路径
path =r'C:\Users\jg2yXRZ\OneDrive\桌面\蒙德里安1000张挑选'
folder_path=path+r'\02挑选后添加学号'

N=['小正方','长条','半竖','半横','全竖','全横','全正']

root_folder = folder_path

ordered_select_folders = [os.path.join(root_folder, folder, '挑选') for folder in os.listdir(root_folder)]
# print(ordered_select_folders)
# print(len(ordered_select_folders))

# 按照N的顺序重新排列select_folders
select_folders = sorted(ordered_select_folders, key=lambda x: N.index(x.split('\\')[-2]))
# print(select_folders)

# 尺寸
s=[['13.9','13.9'],['27.38','5.2'],['13.69','19.1'],['19.1','13.69'],['19.25','27.85'],['28.30','19.10'],['19.1','19.1']]
# 格子数量
g=[2,3,2,2,1,1,1]

# 读取word文件
w=[]
r=1
for file_name in os.listdir(path):    
    if file_name.startswith(f'{r:02}') and file_name.endswith('.docx'):
        file_path = os.path.join(path, file_name)
        print(file_path)
        w.append(file_path)
        r+=1
# print(w)  

all_path=path+r'\03蒙德里安黑白格子精选7类各100张'
os.makedirs(all_path,exist_ok=True)

for x in range(len(select_folders)):

    # 零时文件夹存放文件
    imagePath=path+r'\ls' 
    os.makedirs(imagePath,exist_ok=True)

    # 读取同一款图片
    input_path=select_folders[x]
    file_paths = [os.path.join(input_path, file) for file in os.listdir(input_path)]
    cd=len(file_paths)
    # print(file_paths)

    pic_list_six = [file_paths[i:i+g[x]] for i in range(0, len(file_paths), g[x])]
    # print(pic_list_six)
    # print(len(pic_list_six))
    # 100zhang
    # print('----3、黏贴图片卡,一页1图、1页2图 一页6图-------')

    # 处理每一组图片
    for group_index, group in enumerate(pic_list_six):
        # print(group_index)
        # # 99
        # print(group)
        # ['C:\\Users\\jg2yXRZ\\OneDrive\\桌面\\蒙德里安1000张挑选\\02挑选后添加学号\\全正\\挑选\\00596.png']

        # 创建新的Word文档
        doc = Document(w[x])
        
        # # 遍历每个单元格,并插入图片
        for cell_index, image_file in enumerate(group):
            # print(cell_index)
            # 表012
            # print(image_file)
            # C:\Users\jg2yXRZ\OneDrive\桌面\蒙德里安1000张挑选\02挑选后添加学号\全正\挑选\00596.png

            # 计算图片长宽(单位:厘米)
            table = doc.tables[cell_index]
            cell = table.cell(0, 0)
            cell_paragraph = cell.paragraphs[0]
            cell_paragraph.clear()
            run = cell_paragraph.add_run()    
            
            run.add_picture(os.path.join(image_file), width=Cm(float(s[x][0])), height=Cm(float(s[x][1])))
            cell_paragraph.alignment = 1  # 设置单元格中的文本居中

        # 保存修改后的.docx文件
        doc.save(imagePath + fr'\{group_index + 1:02d}页.docx')
        # docx 文件另存为PDF文件
        inputFile = imagePath + fr'\{group_index + 1:02d}页.docx'  # 要转换的文件:已存在
        outputFile = imagePath + fr'\{group_index + 1:02d}页.pdf'  # 要生成的文件:不存在
        convert(inputFile, outputFile)
        time.sleep(0)

    pdf_lst = [f for f in os.listdir(imagePath) if f.endswith('.pdf')]
    pdf_lst = [os.path.join(imagePath, filename) for filename in pdf_lst]
    pdf_lst.sort()
    file_merger = PdfMerger()
    for pdf in pdf_lst:
        print(pdf)
        file_merger.append(pdf)
    # file_merger.write("C:/Users/jg2yXRZ/OneDrive/桌面/描字帖/(打印合集)大班A整页描字帖2乘5加表格-4名字-({}人).pdf".format(num))
    file_merger.write(all_path+fr"\{w[x][-14:-5]}(1页{g[x]}图共{int(cd/g[x])}页{cd}张).pdf")
    # 9宫格制作2图任务卡时报错,
    # time.sleep(0)
    time.sleep(1)
    # 01 06图答题卡.pdf
        # 02 06图任务卡.pdf
    file_merger.close()
        # doc.Close()

    # # print('----------第5步:删除临时文件夹------------')    
    import shutil
    shutil.rmtree(imagePath) #递归删除文件夹,即:删除非空文件夹

# 打包rar(我的电脑没有装rar)
# import os
# import rarfile

# def create_rar(folder_path, rar_name):
#     # 检查文件夹是否存在
#     if not os.path.exists(folder_path):
#         print("文件夹不存在")
#         return

#     # 创建RAR文件
#     with rarfile.RarFile(rar_name, 'w') as rf:
#         for foldername, subfolders, filenames in os.walk(folder_path):
#             for filename in filenames:
#                 file_path = os.path.join(foldername, filename)
#                 rf.add(file_path, arcname=os.path.relpath(file_path, folder_path))

#     print("RAR文件已创建")

# # 调用函数,将"123"文件夹打包成"123.rar"
# create_rar(all_path, path+r"\蒙德里安黑白格子精选7类各100张.rar")


import os
import zipfile

def create_zip(input_folder, output_file):
    with zipfile.ZipFile(output_file, 'w', zipfile.ZIP_DEFLATED) as zf:
        for root, dirs, files in os.walk(input_folder):
            for file in files:
                zf.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), input_folder))

input_folder = all_path
output_file =path+r'\蒙德里安黑白格子精选7类各100张.zip'
create_zip(input_folder, output_file)

本代码是遍历每个图片文件夹,指定插入图片的尺寸、格子数,

依次读取数字开头的docx文件

运行一次时间很长,大约90分钟才全部运行完

最后7套PDF保存在03文件夹里

作品展示

还有一套zip打包,便于发货

下次再有人买这个学具,终于商品匹配了。

1000张挑选太累了,暂时100张吧(日常教学也够用了)

努力不断改善优化代码的运行速度和学具的质量!!!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2174889.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

记忆osi七层模型的口诀/方法/谐音

物理层、数据链路层、网络层、传输层、会话层、表示层和应用层 物数网传会表应&#xff08;无数网船会飙英&#xff08;语&#xff09;&#xff09; 记忆方法&#xff1a; 想象面前有很多挂着渔网的船&#xff0c;船上的人会说英语。 无数的网船上会有人飙英语。

【Android】多角度看handler--looper的阻塞

在【Android】app中阻塞的looper为什么可以响应touch事件_消息队列阻塞为什么还能响应点击事件-CSDN博客 里面&#xff0c;我们查看到input事件唤醒应用中的looper阻塞&#xff0c; 作为对比&#xff0c;我们再看看广播中的唤醒&#xff0c;我们知道&#xff0c;在注册的广播…

大数据毕业设计选题推荐-食品销售数据分析系统-Hive-Hadoop-Spark

✨作者主页&#xff1a;IT研究室✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Python…

RabbitMQ的高级特性-延迟队列

延迟队列(Delayed Queue)&#xff0c;即消息被发送以后, 并不想让消费者⽴刻拿到消息, ⽽是等待特定时间后,消费者才能拿到这个消息进⾏消费 应用场景 延迟队列的使⽤场景有很多, ⽐如: 1. 智能家居: ⽤⼾希望通过⼿机远程遥控家⾥的智能设备在指定的时间进⾏⼯作. 这时候就可…

linux项目_c语言:Makefile编写、动态库生成、添加动态库路径

一直想搞懂Linux中Makefile是怎么管理项目的&#xff0c;知识积累到一定程度后&#xff0c;我就做了一个自己的缩小项目去把剩下的细节搞清楚 代码&#xff1a; Service.c: #include <stdio.h> #include "lib_sevr.h" int main(){printf("输入a, b的值…

【C++】内存管理:内存分布、new/delete

本篇主要介绍一下C的内存管理相关知识。C的内存管理和C语言保持一致。 1.C/C内存分布 一个程序的数据存储是需要分区的。常见的内存区域划分如下。 我们学C主要了解栈&#xff0c;堆&#xff0c;数据段&#xff0c;代码段 。 我们先看下面代码和相关问题。 int globalvar…

Python编码系列—Python命令模式:将请求封装为对象

&#x1f31f;&#x1f31f; 欢迎来到我的技术小筑&#xff0c;一个专为技术探索者打造的交流空间。在这里&#xff0c;我们不仅分享代码的智慧&#xff0c;还探讨技术的深度与广度。无论您是资深开发者还是技术新手&#xff0c;这里都有一片属于您的天空。让我们在知识的海洋中…

RabbitMQ——消息的可靠性处理

1.业务分析 在业务的开发中&#xff0c;我们通常将业务的非核心业务交给MQ来处理&#xff0c;比如支付&#xff0c;在支付过后&#xff0c;我们需要扣减余额&#xff0c;修改支付单状态&#xff0c;修改订单状态&#xff0c;发送短信提醒用户&#xff0c;给用户增加积分等等&am…

技术分享|一文读懂三维建模技术

在上一期推文中&#xff0c;我们简要介绍了国产3A级大作游戏《黑神话&#xff1a;悟空》中应用的实时渲染技术&#xff0c;同时&#xff0c;还展示了RflySim工具链中基于Unreal Engine虚幻引擎开发的三维可视化显示软件—RflySim3D/UE5。它利用高逼真度的仿真技术&#xff0c;结…

商家营销工具架构升级总结

今年以来&#xff0c;商家营销工具业务需求井喷&#xff0c;需求数量多且耗时都比较长&#xff0c;技术侧面临很大的压力。因此这篇文章主要讨论营销工具前端要如何应对这样大规模的业务需求。 问题拆解 我们核心面对的问题主要如下&#xff1a; 1. 人力有限 我们除了要支撑存量…

全国省、市、县(区)土地利用类型及面积面板数据(2019-2022年)

土地利用类型是根据土地利用方式和地域差异对土地资源单元进行划分的基本土地地域单元。 2019年-2022年全国省、市、县&#xff08;区&#xff09;土地利用类型及面积面板数据_土地利用类型数据下载资源-CSDN文库https://download.csdn.net/download/2401_84585615/89466102 …

2024版最新Wireshark安装使用教程(非常详细)零基础入门到精通,收藏这一篇就够了_wireshark 4.4.0安装要求

前言 这是大白给粉丝盆友们整理的网络安全渗透测试入门阶段渗透测试工具第9篇。 喜欢的朋友们&#xff0c;记得给大白点赞支持和收藏一下&#xff0c;关注我&#xff0c;学习黑客技术 Wireshark 什么是WireShark&#xff1f;Wireshark 是一个开源抓包工具或者叫网络嗅探器&a…

FPGA-Vivado-IP核-逻辑分析仪(ILA)

ILA IP核 背景介绍 在用FPGA做工程项目时&#xff0c;当Verilog代码写好&#xff0c;我们需要对代码里面的一些关键信号进行上板验证查看。首先&#xff0c;我们可以把需要查看的这些关键信号引出来&#xff0c;接好线通过示波器进行实时监测&#xff0c;但这会用到大量的线材…

ViTamin——视觉-语言时代的可扩展视觉模型设计

人工智能咨询培训老师叶梓 转载标明出处 尽管视觉-语言模型&#xff08;VLMs&#xff09;已经取得了显著的成就&#xff0c;但在图像编码器的选择上&#xff0c;传统的视觉Transformer&#xff08;ViT&#xff09;依然是主流。尽管Transformer在文本编码领域已经证明了其有效性…

无线感知会议系列【5】 无线感知边界-1

前言&#xff1a; 无线感知边界是整个ISAC 里面一个研究的难点和重点。 本篇主要来源于2022 《WiFi感知边界研究-Ubicomp2022论文分享》 感知的相关论文组会 2016年无线感知研究主要是国内高校主导,各种无线感知论坛 2021年无线感知 VIVO,OPPO &#xff0c;华为&#xff0c;国…

LeetCode讲解篇之33. 搜索旋转排序数组

文章目录 题目描述题解思路题解代码 题目描述 题目链接 题解思路 旋转后的数组具备一个特性&#xff0c;如果把数组分割成两部分&#xff0c;必定至少有一部分是递增的&#xff0c;并且其中递增区间可以通过左端点小于右端点这个特征来确定 我们基于这个特性&#xff0c;进…

通信工程学习:什么是MIMO多输入多输出技术

MIMO:多输入多输出技术 MIMO(Multiple-Input Multiple-Output)多输入多输出技术是一种在无线通信中广泛应用的技术,它通过利用多个天线进行数据传输和接收,可以显著提高无线通信系统的性能和容量。以下是对MIMO技术的详细解释: 一、定义与原理 MIMO技术…

XWF使用指南

简介 X-Ways Forensics 是由 Stefan Fleischmann 编写的一个轻量化的应急响应及取证工具&#xff0c;是 WinHex 的法证版本&#xff0c;因此界面逻辑和 WinHex 较为相似。在配置好 mplayer 的情况下&#xff0c;程序总体积在 100MiB 左右&#xff0c;运行时内存占用极低&#…

【数据修复指南】手把手教你使用线性插值填补各类遥感数据缺失——Modis、Landsat和Sentinel

线性插值 1. 写在前面2. MODIS数据插值3. Landsat数据插值3.1 参数修改以适应其他类型的遥感数据3.2 Landsat数据汇总3.3 Sentinel卫星介绍 1. 写在前面 之前我写了使用年内均值或者中值来填补数据控制的方法&#xff0c;这种方法较为简单&#xff0c;不够精确。因此&#xff0…

面向人工智能: 对红酒数据集进行分析 (实验四)

由于直接提供截图是不切实际的&#xff0c;我将详细解释如何使用scikit-learn&#xff08;通常称为sk-learn&#xff09;自带的红酒数据集进行葡萄酒数据的分析与处理。这包括实验要求的分析、数据的初步分析&#xff08;完整性和重复性&#xff09;以及特征之间的关联关系分析…