ELEC 5304 -无代写-Assignment 3
时间:2025-05-24
ELEC 5304 Assignment 3

Option 1: CIFAR-10 Training in Challenging Environments (75% overall Mark)

I. Objective:
In real-world scenarios, raw data is often noisy, incomplete, or corrupted, making model training more
difficult. In this assignment, you are required to train a model on the CIFAR-10 dataset under simulated
adverse conditions and achieve a testing accuracy of at least 80% on the original test set.
II. Task Description:
You will simulate two types of data quality issues to create a "disadvantaged" training environment:
1. Label Corruption
Due to visual similarity, 30% of the images labeled as cats and dogs are deliberately mismatched — that
is, some cat images are incorrectly labeled as dogs and vice versa.
2. Nighttime Image Distortion
Since deer and frogs are often photographed in low-light conditions, images from these two classes must
be altered to simulate a nighttime scenario with a flashlight effect. Specifically, apply both the following
transformations:
def night_filter(img):
img = np.array(img).astype(np.float32) / 255.0
img *= 0.3 # Reduce brightness
img[..., 2] += 0.2 # Enhance blue channel
img[..., 1] += 0.05 # Enhance green
img = np.clip(img, 0, 1)
return img
def add_spotlight(img_array, radius=12, intensity=0.6):
h, w, _ = img_array.shape
center = (np.random.randint(radius, w - radius),
np.random.randint(radius, h - radius))
Y, X = np.ogrid[:h, :w]
dist = np.sqrt((X - center[0]) ** 2 + (Y - center[1]) ** 2)
mask = np.clip(1 - (dist / radius), 0, 1) * intensity
for c in range(3):
img_array[..., c] += mask
img_array = np.clip(img_array, 0, 1)
return img_array

The transformed images should visibly resemble a nighttime photo with a simulated flashlight glare.


III. Instructions:
1. Use the modified training dataset (with label corruption and nighttime effects) for training.
2. Use the original, unmodified CIFAR-10 test set for evaluation.
3. Your model should achieve ≥ 80% accuracy on the test set.



Option 2: Tomato Leaf Diseases Detection (100% overall Mark)

I. Objective:
Tomato leaf diseases have been shown to significantly impact crop yield. Manual inspection of leaves is both
time-consuming and resource-intensive. As a result, computer vision (CV)-based automatic detection has
become a promising and efficient alternative, particularly when deployed in reasonable lightweight
environments.
In this task, you are required to train a detection model that can accurately identify various types of tomato
leaf diseases and meet specified performance metrics.
II. Task Description
You will use the provided training dataset to train your model and the test dataset for evaluation. Each image
is labeled using the following format:
6 0.565625 0.65390625 0.0515625 0.03125
Explanation:
• 6: The class label — in this case, class 6 corresponds to a specific tomato leaf disease.
• 0.565625, 0.65390625: Normalized coordinates of the bounding box center.
• 0.0515625, 0.03125: Normalized width and height of the bounding box.

1. Baseline Achievement (Initial)
You will evaluate your model using Box Precision and mAP@50 as the primary metrics, both of which
must exceed 0.75. Additionally, you are required to select one extra evaluation metric to demonstrate
your model’s performance and justify your choice with a clear explanation of its relevance to this task.

2. Fourier-Based Loss Component (Post)
After achieving the required baseline performance, your group must incorporate a Fourier-based loss
into the training process. This loss should be computed from the image representations in the frequency
domain using the Fourier Transform.
• Implementing the Fourier loss and integrating it with your existing model training pipeline.
• Comparing model performance before and after adding the Fourier-based loss.
• Analyzing and explaining whether and why the Fourier loss improves performance — with a
particular focus on explainability in the context of tomato leaf disease detection.

Testing data download:
https://drive.google.com/drive/folders/1kU0LtrZcozzOc7dNXuqcfPXWSN36ebXv?usp=drive_link
Training data download:
https://drive.google.com/drive/folders/18rvdYBQjNOiY5g9KAcCqZhVu0M3UDz-R?usp=drive_link





Please note:
1. Each group selects one task option only. Choosing Option 1 will result in a maximum overall mark of
75%, while Option 2 allows for full (100%) marks. You are required to design your own model and not use
any existing architecture.
2. This assignment includes both a submission and a presentation. Only a .ipynb file — containing code and
inline explanations — should be submitted.
3. The presentation must be recorded and uploaded to an accessible platform (e.g., YouTube, Google Drive,
etc.) where the teaching team can view it, by 27th May.
4. Based on your video, follow-up questions will be asked during Week 13 tutorials and lectures as part of
the assessment. Everyone is required to attend the session assigned to your group. There are 26 groups per
session. Please enter your Group ID in your preferred session time via the following link:
https://docs.google.com/spreadsheets/d/15nPQR0OjGnppv7T7Y64T-YQRNp2Z7cvuqB15-
0QUfpM/edit?usp=sharing
5. The deadline for the file submission is 31st May.



Marking criteria:
Option 1: CIFAR-10 (75%) Option 2: Tomato Leaf Diseases (100%)
Training data preparation: 10% Initial Performance achievement:10%
Performance achievement (60%,70%,80):3*5% Metric selection:5 %
Clear code and submission: 10% Post Performance enhacement:15%
Clear discussion of the model evolution:15% Post Performance enhancement explanation 10%
Clear discussion of the model evolution:5 %
Clear code and submission: 5%
Presentation (Video+Q&A): 50% Presentation(Video+Q&A): 50%


学霸联盟
essay、essay代写