强推免费的零基础计算机编程公开课:哈佛CS50

是我目前为止看到最好的零基础计算机编程公开课。很适合工业设计等非计算机专业的同学入门学习计算机编程。

当然哈佛本来就是全世界排名前五的学校,有这个机会免费学习哈佛的课程蛮好的。

比如调试C语言学习环境的时候,很多同学会在第一步卡住,环境配置不好。但是CS50与Github合作提供了在线编译环境,在任何一个设备上都可以云端编写并运行代码:cs50.dev(需要科学)

免去了很多配置环境的烦恼,使学生能够专注于算法本身的学习。

 

个人感觉:优秀的老师与一般的老师区别就是:优秀的老师更能够从学生现有的知识体系出发,尽可能多的讲解可以理解的知识,避免常见的错误,循序渐进让学生能够掌握足够的知识。而不是一个字一个字念PPT这种行为。

The python code to batch modify the image resolution and fill the redundant area of the image

This code is for beginners to use, we refer to a lot of code on the Internet, thank the predecessors for their contributions.

The goal of this code is to modify the resolution of all the pictures to 128*128. While modifying the images, it will not elongate them, but supplement the deformed part by filling pure white(any color can be fill by change RGB), which is conducive to the training of GAN.

The code is python, can be copied later debugging use.

Thanks for xinggui.

The last part 【cut_images(‘F:/date/JPG128enhance/’, ‘new’, 128, 128)】is the target folder you want to enhance.

And 128 represents the image resolution that needs to be modified. For example, 128, 128 represents a picture with a resolution of 128*128, if you need other picture resolutions, you can modify it yourself.
The way for beginners to use is to copy this code into vscode, modify the address of the target directory, save it as a .py file, and then click the small triangle in the upper right corner to run the code.

基于python的图像批量修改分辨率且周边填充空白的代码

小白写的,小白用,也是参考了网上的很多代码,感谢大佬们的贡献。

这个代码的目标是,把所有图片全部分辨率修改为128*128,在修改的同时并不会拉长图像,而是通过填充纯白色的方式来补充变形部分,有利于GAN的训练。

代码是python的,当时和星轨桑一起研究的,但是如何发挥工作已经忘记了,可以复制以后自行调试使用。

其中最后一段【cut_images(‘F:/date/JPG128enhance/’, ‘new’, 128, 128)】是需要修改的目标文件夹,依照自己所需要转换的文件夹来使用,而128代表着需要修改的图片分辨率,举例子128,128代表着128*128分辨率的图片,如果需要其他图片分辨率就自己修改好了,小白的使用方法就是把这段代码复制到vscode里,修改好目标目录的地址,另存为一个.py的文件,然后点击右上角的小三角运行代码即可。

【PYQT】How to modify the Label text and attributes in PYQT Design by clicking the button

The purpose of this article is to use pyQt Design to create a graphical Python GUI. When a button is clicked, the text content of a TextLabel changes  

Use VS CODE as the compiler, and install PYQT Integration plug-in for graphical.  UI compiles, converts.ui into.py, and any other compiler compiles pyQt in the same way  

如何使用stylegan训练自己的照片数据集

今天完成了简单的stylegan自定义数据集训练过程,感谢国外老哥的教程,原来很简单……其实对于专门做人工智能方面的人来说训练应该是很简单的,但是对于我这种跨专业跨领域的小白来说,还是需要一个详细教程的,这里给大家介绍一下如何使用自己的数据集来测试stylegan。首先,大家需要在自己的电脑上配置好tensorflow环境,注意:tensorflow2.0可能无法运行stylegan的原始代码,建议使用1.13版本。个人运行环境:WIN10+CUDA10.0 +CUDNN7.5+ TENSORFLOW-GPU1.13.1 + python3.7