In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- File loc: static/index.html --> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "pydantic" | |
version = "0.1.0" | |
description = "" | |
authors = ["Gautam Mishra <mishragautam96@gmail.com>"] | |
[tool.poetry.dependencies] | |
python = "^3.9" | |
[tool.poetry.dev-dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering | |
function dither(img::AbstractArray{<:Colorant}) | |
n,m = size(img) | |
for i in 2:n-1 | |
for j in 2:m-1 | |
old_pixel = img[i,j] | |
new_pixel = round(old_pixel*256)/256 | |
img[i,j] = new_pixel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileIO, ImageQualityIndexes | |
img1 = load("fabio_gray_512.png"); # https://i.imgur.com/jGM4euO.png | |
img2 = load("lena_gray_512.png"); # https://i.imgur.com/LHqmBwZ.png | |
assess_ssim(img1, img2) | |
# 0.34505006577497543 | |
assess_msssim(img1, img2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iref = imread('lena_gray_512.png'); % https://i.imgur.com/LHqmBwZ.png | |
I = imread('fabio_gray_512.png'); % https://i.imgur.com/jGM4euO.png | |
figure; | |
montage({Iref,I}); | |
score = multissim(I,Iref) | |
# 0.3701 | |
[ssimval,ssimmap] = ssim(I,Iref); | |
ssimval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function radon(img::AbstractArray, theta=range(0,stop=pi,length=minimum(size(img)))) | |
ilength, iwidth = size(img) | |
idiag = sqrt(ilength^2 + iwidth^2) | |
length_pad = ceil(idiag-ilength) + 2 | |
width_pad = ceil(idiag-iwidth) + 2 | |
# Make enough padding so we don't loose anything on rotation | |
pad_image = zeros(Int(ilength+length_pad), Int(iwidth+width_pad)) | |
pad_image[Int(ceil(length_pad/2)):Int(ceil(length_pad/2)+ilength-1), | |
Int(ceil(width_pad/2)):Int(ceil(width_pad/2)+iwidth-1)] = img; |
- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/