RBE306TC Computer Vision Systems

RBE306TC Computer Vision Systems

Assignment

Before you dive into this Exercise 1 to Exercise 3, please check the following OpenCV functions in

Python Coding Platform for example: imread, shape, imshow, imwrite, imnoise, resize, calcHist, equalizeHist, etc.

Some other Python built-in functions, or functions in Scipy package may also be used. Please refer to online resources.

Hint: read the descriptions about each of the previous functions and any other function you might use. You may find descriptive sections of Algorithms(s) in some of the Python functions.

Exercise 1 (20%)

In this task, we use the monochrome image Lenna (i.e., lenna512.bmp) with the following tasks.

Let's regard this reference image Lenna as IM.

• (a). Add Gaussian white noise with 0 mean and variance 10 to the image IM and display the noisy image. We name it as IM_WN. Please write one function to generate this image instead of calling Matlab function directly (4%).

• (b). Add salt & pepper noise with noise density 10% to the image IM and display the noisy image.

We name it as IM_SP. Please write one function to generate this image instead of calling

Matlab function directly (4%).

• (c). Display the histograms of all the previous images and compare them with the histogram of the reference image, comments and briefly explain your finding (4%).

• (d). Use the command histeq to enhance the image constrast

(lenna512_low_dynamic_range.bmp) and display the enhanced image (4%).

• (e). Moreover, display the histograms of both original image and enhanced image, and explain your finding in the assignment (4%).

Exercise 2 (25%)

Recall salt & pepper images generated in Task 1 IM_SP based on the IM.

• (a). Apply the median filter with a 3 × 3 window and a 5 × 5 window on the image IM_SPrespectively. Display and evaluate the PSNR of the obtained images. For each window size, comment on how effectively the noise is reduced while sharp edges and features in the image are preserved (8%).

• (b). Use the average filter (mean filter) 3 × 3 to filter the image IM_SP. Compute the PSNR and display the filtered image (8%).

• (c). As you experimented with the mean and median algorithms what different property did you notice? Was the average or median filter better and why (9%)?

Exercise 3 (55%)

In this exercise, you will be asked to build a VGG-16 and VGG-19 (see the following architecture) to train a classifier on cifar10 dataset. based on the python + PyTorch codes implemented in Lab 4 for LeNet.

The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images

per class. There are 50000 training images and 10000 test images. The dataset is divided into five training batches and one test batch, each with 10000 images. The test batch contains exactly 1000 randomly-selected images from each class. The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another.

Between them, the training batches contain exactly 5000 images from each class.

相关推荐
伯奥克客服1 分钟前
AI视频过滤器工程选型指南:接口、离线推理与联动控制
人工智能·音视频
落樱弥城2 分钟前
FlashAttention 完全解析:从 Roofline 诊断到 CUDA 实现
人工智能·算法
JJJennie7773 分钟前
大模型网关部署方案?MAI Gateway从部署到上线全流程
人工智能·gateway·ai网关
隔窗听雨眠4 分钟前
从行为引导到基础设施约束:AGI代理风险缓解的工程化路径
网络·人工智能·agi
tellmewhoisi5 分钟前
深度学习21:PyTorch:激活函数(Sigmoid,Tanh,ReLU,Softmax)
人工智能·pytorch·深度学习
ahccqw6 分钟前
Opencv 基础常用API
人工智能·opencv·计算机视觉
FelixZhang02811 分钟前
不懂金融或不会编程,如何开始量化?从策略搭建到回测验证
人工智能·python·算法·数学建模·均值算法·自然语言处理·金融
可乐ea12 分钟前
Kimi K3.1 Pro 选型:1M 上下文和每任务成本怎么算
人工智能·计算机视觉·ai智能体·上下文窗口·大模型选型·kimik3.1pro·agent成本
Dawson Zhu13 分钟前
【AI编译器入门③】编译前端:ONNX、TorchScript与动态shape处理
人工智能·语言模型·架构·aigc·agi
愤怒火龙果15 分钟前
AI攻防 AIRT05-AI Supply Chain and Infrastructure Attacks
人工智能·ai安全