duangsuse::Echo
这个是 stop montage,就是每个 subtitle 排版不变化的(传递 --key-thres 0 每个色块都必须绘制导致的) 没加声音因为不是成品,是替补剪辑素材
大概说一下必须要啥接口啊…… (不止这个项目,是我最近用过的 API,emmm) #Python
Image 方面:
ImageDraw:
然后对 #CV 来说, fps, n_frames, width, height 是必须的
这些 API,OpenCV 不支持 unicode 字体,但可以写 C++ 扩展,用 freetype 画啊
from PIL import Image, ImageDraw, ImageFont
Image 方面:
Image.open(path), Image.new(mode, size, fill)骚操作:
size, width, height
getpixel, putpixel
mode, Image.getmodebands
resize, crop, paste
palette
offset((x,y))
getchannel("R")
histogram()
getextrema()
可以算通道极值ImageDraw:
ImageFont.truetype(path)
ImageDraw.Draw(img)
ImageDraw.text(pos, text, font, fill)
然后对 #CV 来说, fps, n_frames, width, height 是必须的
def cv2VideoInfo(cap):剩下
props = [cv2.CAP_PROP_FRAME_COUNT, cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT]
return (cap.get(cv2.CAP_PROP_FPS),) + tuple(int(cap.get(p)) for p in props)
VideoCapture.read, VideoWriter.write
就好了这些 API,OpenCV 不支持 unicode 字体,但可以写 C++ 扩展,用 freetype 画啊
java.awt.image.BufferedImage
和 java.awt.Graphics
也是支持绘制文字的(但不能在调用里直接自定义字体)Forwarded from duangsues.is_a? SaltedFish
def channelHistogram(img):#Python #code #CV 🤔
n_channels = Pillow.getmodebands(img.mode)
hist = img.histogram()
return tuple(hist[i:i+256] for i in range(0, n_channels*256, 256))
def imagePixels(img):
for y in range(0, img.height):
for x in range(0, img.width):
yield img.getpixel((x, y))
def count(xs): return sum(map(lambda _: 1, xs))
asciiv.cpp
2.1 KB
列一些有趣的社区项目 #math #listing #Java
https://www.desmos.com/calculator/i6fijibmbz
#GUI 系列:
https://github.com/darsam44/Mini-desmos (吐嘈: 真的不迷你)
https://github.com/DanielZhangD/Javmos
https://github.com/LitterallyTheCoolestGuy69/Desmos-But-Scuffed
#Python 转换/等式代码生成脚本系列:
https://github.com/MrNewdary/svg2desmos/blob/main/svg2desmos.py
https://github.com/anematode/parametrizer/blob/master/undeletable.py
https://github.com/allesspassig/despy/blob/master/despy.py
https://github.com/emily-yu/image-to-desmos OpenCV #cv
#music https://github.com/AlexApps99/MIDI2Desmos 听 MIDI 函数图系列...
多项式课系列:
https://github.com/galbar07/Desmos
https://github.com/yonatan555/Desmos-Polynom
https://github.com/JiangTianXiang/Grade-12-Calculus-Graphing-Calculator
https://github.com/WhoIsKatie/Javmos
https://github.com/TimChoy/javmos
https://github.com/DvirTomer/Desmos-Polynom
乱入:
https://github.com/andrewpareles/Calculator/blob/master/main.ml
https://github.com/Tuttivers/ExponentialSeekbar-sample/blob/master/NearMeSeekBar.kt#L75 #Kotlin #Android
https://mukunthag.github.io/SHM/ 振荡器什么的...
https://github.com/Rob--/root-approximations/blob/master/evaluatex.js#L190 #JavaScript #lib #parsing 几百行的符号代数系统...
可移植性/项目管理极差的 GUI:
https://github.com/Pi-Man/Graphing-Calculator/tree/master/Graphing-Calculator
https://github.com/RohanK22/cppmathtool
http://well-made-territory.surge.sh/Desmos.html
https://github.com/softchickenidiot/3D-Grapher/tree/master/3D Grapher
https://www.desmos.com/calculator/i6fijibmbz
#GUI 系列:
https://github.com/darsam44/Mini-desmos (吐嘈: 真的不迷你)
https://github.com/DanielZhangD/Javmos
https://github.com/LitterallyTheCoolestGuy69/Desmos-But-Scuffed
#Python 转换/等式代码生成脚本系列:
https://github.com/MrNewdary/svg2desmos/blob/main/svg2desmos.py
https://github.com/anematode/parametrizer/blob/master/undeletable.py
https://github.com/allesspassig/despy/blob/master/despy.py
https://github.com/emily-yu/image-to-desmos OpenCV #cv
#music https://github.com/AlexApps99/MIDI2Desmos 听 MIDI 函数图系列...
多项式课系列:
https://github.com/galbar07/Desmos
https://github.com/yonatan555/Desmos-Polynom
https://github.com/JiangTianXiang/Grade-12-Calculus-Graphing-Calculator
https://github.com/WhoIsKatie/Javmos
https://github.com/TimChoy/javmos
https://github.com/DvirTomer/Desmos-Polynom
乱入:
https://github.com/andrewpareles/Calculator/blob/master/main.ml
https://github.com/Tuttivers/ExponentialSeekbar-sample/blob/master/NearMeSeekBar.kt#L75 #Kotlin #Android
https://mukunthag.github.io/SHM/ 振荡器什么的...
https://github.com/Rob--/root-approximations/blob/master/evaluatex.js#L190 #JavaScript #lib #parsing 几百行的符号代数系统...
可移植性/项目管理极差的 GUI:
https://github.com/Pi-Man/Graphing-Calculator/tree/master/Graphing-Calculator
https://github.com/RohanK22/cppmathtool
http://well-made-territory.surge.sh/Desmos.html
https://github.com/softchickenidiot/3D-Grapher/tree/master/3D Grapher
Desmos
Final Project
我大致看了一下回形针粉丝文稿归档,觉得它文案确实没有回答一些好奇问题,而且在这上百期里出了些知识差错,但作为「硬科普」已经够了——好好看看现在你能在各种tv、科学杂志上,回形针的文稿其实是不比它们差的
科普≠设计手册,一些有专人士的脑没专业人士的责任感的人就搞不懂这个。许多误差回形针也知道但不可能绝对严谨。严谨不是“硬”科普唯一的标杆,首先要有传播价值,同时也要尽量准确。
https://paperclip.wiki/Vol.112/
就讲了区块链、虚拟货币需要分布式可信账本,靠算力挖矿证明价值,是因为矿池上首先算出来、长度最大的人有权记账,然后是下一区块,无穷无尽,
https://paperclip.wiki/Vol.072/
解释了机械/固态硬盘通过磁头/晶体管-电子保留状态的原理
不过最后它没有解释为什么“固态硬盘断电1年数据丢失”,而U盘不会。
当然啦,同样基于颗粒,类型也是不一样的。RAM就分DRAM和SRAM,前者需定时刷新才能保证不丢失,后者性能更好,但面积存储效率太低了
回形针也没科普BIOS时代 CHS和LBA 的地址问题
https://paperclip.wiki/Vol.120/ 用很长的篇幅解释了 #cv #cg 二维码的编码原理,这个程度和知名度,比 #zhihu 的许多人都值得钦佩了
科普≠设计手册,一些有专人士的脑没专业人士的责任感的人就搞不懂这个。许多误差回形针也知道但不可能绝对严谨。严谨不是“硬”科普唯一的标杆,首先要有传播价值,同时也要尽量准确。
https://paperclip.wiki/Vol.112/
就讲了区块链、虚拟货币需要分布式可信账本,靠算力挖矿证明价值,是因为矿池上首先算出来、长度最大的人有权记账,然后是下一区块,无穷无尽,
https://paperclip.wiki/Vol.072/
解释了机械/固态硬盘通过磁头/晶体管-电子保留状态的原理
不过最后它没有解释为什么“固态硬盘断电1年数据丢失”,而U盘不会。
当然啦,同样基于颗粒,类型也是不一样的。RAM就分DRAM和SRAM,前者需定时刷新才能保证不丢失,后者性能更好,但面积存储效率太低了
回形针也没科普BIOS时代 CHS和LBA 的地址问题
https://paperclip.wiki/Vol.120/ 用很长的篇幅解释了 #cv #cg 二维码的编码原理,这个程度和知名度,比 #zhihu 的许多人都值得钦佩了
paperclip.wiki
Vol.112 区块链到底是什么? - PaperClip Fans
Hi~ 这里是回形针非官方的资料整理仓库.
duangsuse::Echo
https://twitter.com/GrantCuster/status/1457786663275413509 Tech-wise this type in WebGL (using three.js). The letters are put together in a canvas sprite sheet, then placed as a texture on *instanced rectangles*. It's a very different set of constraints than…
Telegram
duangsuse::Echo
为了吹哨人、发哨人,以及所有为了疫情努力过的人(当然,显然我不包括在其中)
本频道 image 象征性灰今明两天。 #Telegram #China
#Python Pillow:
from PIL import Image
def grayifyFile(name):
img = Image.open(name)
img.convert("L").save(name.rsplit(".")[0])
grayifyFile("image.png")
OpenCV #CV #Cplusplus:…
本频道 image 象征性灰今明两天。 #Telegram #China
#Python Pillow:
from PIL import Image
def grayifyFile(name):
img = Image.open(name)
img.convert("L").save(name.rsplit(".")[0])
grayifyFile("image.png")
OpenCV #CV #Cplusplus:…
#cv 刚开始震惊到了.. 我以为它在面部👴中间画圈来截取👃 --它怎么知道鼻子在脸中间
太👍,5~13 这个数据是原文没给的.. 以后可以和低创文章say bye
注意,中文貌似搜不到具体代码.. 只能说能用dlib
太👍,5~13 这个数据是原文没给的.. 以后可以和低创文章say bye
注意,中文貌似搜不到具体代码.. 只能说能用dlib
duangsuse::Echo
#ai #hard https://orangeblog.notion.site/GPT-4-AGI-8fc50010291d47efb92cbbd668c8c893 ref:https://tttttt.me/solidot/20656 http://arthurchiao.art/blog/gpt-as-a-finite-state-markov-chain-zh/ 3年前就有人使用GPT-3 生产代码 #math https://tttttt.me/rynif/30085 https://tttttt.me/solidot/20586…
#ai #cv #news 高配版YOLO BV1vV4y1f7EM
github开源:https://github.com/facebookresearch/segment-anything
demo演示地址:https://segment-anything.com/demo
“计算机视觉的大厦已经建成,只是还有两小片乌云
看了看SAM的demo,现在非常感谢当年没让我做图像方向的老师。
做过的图像分割的算法都可以忘了,书可以留着作为纪念,几十年之后可以回忆一下曾经有过一个用各种特征、色彩、频率、灰度、形态、深度等方法进行图像分割的年代,多么天真的时代!
可能过不了多久,分类、检测、分割、追踪等等一个模型就可以实现了,训练自己特定的数据集
”
“这种研究项目能开源出来,大家都可以去学习去用,国内的一些公司随便什么东西,稍微能挣钱就只给你API,也算能明白chatgpt为什么姓美了
我在本地跑了,这个模型甚至能在2070s上跑起来,速度也不算慢,因为涉及到文件操作我没去统计他的fps,一秒出一张
看demo没支持text prompt,估计语义和低层次几何结构不能open;比较震惊我的是发布的这个1 billion mask数据集,没几个公司能玩得起啊,mask-image pair的标注难度可比可爬取的caption-image难”
github开源:https://github.com/facebookresearch/segment-anything
demo演示地址:https://segment-anything.com/demo
“计算机视觉的大厦已经建成,只是还有两小片乌云
看了看SAM的demo,现在非常感谢当年没让我做图像方向的老师。
做过的图像分割的算法都可以忘了,书可以留着作为纪念,几十年之后可以回忆一下曾经有过一个用各种特征、色彩、频率、灰度、形态、深度等方法进行图像分割的年代,多么天真的时代!
可能过不了多久,分类、检测、分割、追踪等等一个模型就可以实现了,训练自己特定的数据集
”
“这种研究项目能开源出来,大家都可以去学习去用,国内的一些公司随便什么东西,稍微能挣钱就只给你API,也算能明白chatgpt为什么姓美了
我在本地跑了,这个模型甚至能在2070s上跑起来,速度也不算慢,因为涉及到文件操作我没去统计他的fps,一秒出一张
看demo没支持text prompt,估计语义和低层次几何结构不能open;比较震惊我的是发布的这个1 billion mask数据集,没几个公司能玩得起啊,mask-image pair的标注难度可比可爬取的caption-image难”
GitHub
GitHub - facebookresearch/segment-anything: The repository provides code for running inference with the SegmentAnything Model (SAM)…
The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model. -...
duangsuse::Echo
#py #backend https://tttttt.me/NewlearnerChannel/11360 Python 潮流周刊 #10:Twitter 的强敌 Threads 是用 Python 开发的 👉 3、Python 3.12 预览版:支持 Linux 性能分析器 (英) 4、FastDepends:从 FastAPI 中提取的依赖注入框架,异步和同步模式都支持 (英) 5、https://github.com/0xpayne/gpt-migrate :将代码仓从一种框架或语言迁移成其它 (英) 6、使用…
🖕 #statement #ai
上文作者认为AI会阻止程序员做产品经理以外的“解谜”游戏,把《以撒的结合》那种随机 #game 变成只在关键节点下命令的QQ农场
但我觉得,代码和编程是要区分开的。 编程并不是思维游戏,“[1,[2 3]].flat() 的实现” 是很无意义的,代码复杂性只是心智模型不完备导致的
比如 flat [1,2, x=[] ,.] 用遍历-模式匹配 x.flat(depth+1, to=this) 就很容易解决; 所谓难点,无非就是你认知不到“数据模式”而已
编程并不是解谜游戏,而是《盾娘》那种MMORPG :扮演各种领域和用户来思考自己的需求 ;这才是计算机最本职的能力
不过,我也很少直接问bing要代码,bug相信 interpreter 模式能自己修,但是「需求说明」还是费力的
AI不能阻止编程语言的发展, 就像有PHP的时代,人们也会走向ASP,JSP和SPA ;这不止是PHP的落后,因为即便是“同期的”Rust和Java,之间也是有可比性的; AI不能像Kotlin那样在可维护上超越旧的形式化语言
#ai #cv #tool 一些项目的截图
上文作者认为AI会阻止程序员做产品经理以外的“解谜”游戏,把《以撒的结合》那种随机 #game 变成只在关键节点下命令的QQ农场
但我觉得,代码和编程是要区分开的。 编程并不是思维游戏,“[1,[2 3]].flat() 的实现” 是很无意义的,代码复杂性只是心智模型不完备导致的
比如 flat [1,2, x=[] ,.] 用遍历-模式匹配 x.flat(depth+1, to=this) 就很容易解决; 所谓难点,无非就是你认知不到“数据模式”而已
编程并不是解谜游戏,而是《盾娘》那种MMORPG :扮演各种领域和用户来思考自己的需求 ;这才是计算机最本职的能力
不过,我也很少直接问bing要代码,bug相信 interpreter 模式能自己修,但是「需求说明」还是费力的
AI不能阻止编程语言的发展, 就像有PHP的时代,人们也会走向ASP,JSP和SPA ;这不止是PHP的落后,因为即便是“同期的”Rust和Java,之间也是有可比性的; AI不能像Kotlin那样在可维护上超越旧的形式化语言
#ai #cv #tool 一些项目的截图