Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
What the course covers
A real case study: land classification from geospatial images.
- Data handling, custom loaders and image augmentation.
- CNNs built and trained in both Keras and PyTorch.
- Vision transformers with transfer learning.
- A final portfolio project graded from the course labs.
| Module | Main focus |
|---|---|
| Module 1 · about 4 hours | Data Handling: case study, environment, custom loaders, augmentation, Keras and PyTorch |
| Module 2 · about 4 hours | CNN Model Development: build and train CNNs in Keras and PyTorch, compare them |
| Module 3 · about 5 hours | CNN and Vision Transformer: patches, self-attention, transfer learning, comparison |
| Module 4 · about 1 hour | Final Submission and Wrap-Up: submit all labs, review, next steps |
Module 1: Data Handling
Data Handling: case study, environment, custom loaders, augmentation, Keras and PyTorch.
- The case study classifies geospatial images by land type, for example agricultural land.
- A custom dataset maps image files to labels. Keras uses a sequence or generator; PyTorch uses
DatasetandDataLoader. - Memory-based loading keeps all images in RAM. Generator-based loading reads batches on demand, which suits big data.
- Data augmentation makes new training images, for example with flips and crops. It reduces overfitting.
- Keep the image and its label or mask together when you split the data.
Module 2: Convolutional Neural Network Model Development
CNN Model Development: build and train CNNs in Keras and PyTorch, compare them.
- A CNN finds local patterns: edges, textures, then larger shapes.
- In Keras, use
Conv2D,MaxPooling2D,FlattenandDenselayers. - In PyTorch, use
nn.Conv2d,nn.MaxPool2d,nn.Flattenandnn.Linear. - Train both models on the same split. Compare accuracy, loss, training time and code effort.
- Tune a few hyperparameters: filters, kernel size, learning rate and epochs.
Module 3: CNN and Vision Transformer Integration
CNN and Vision Transformer: patches, self-attention, transfer learning, comparison.
- A vision transformer cuts the image into fixed patches, embeds them, and adds position information.
- Self-attention lets every patch look at every other patch, so the model sees global context.
- Transfer learning: load a pretrained transformer, replace the classification head, then fine-tune.
- Freezing the old layers trains fewer parameters and needs less data.
- Compare CNN and transformer results in both Keras and PyTorch. Report the trade-offs.
Module 4: Final Submission and Wrap-Up
Final Submission and Wrap-Up: submit all labs, review, next steps.
- The final grade comes from all the labs you completed in the course.
- Check file names, saved model paths and notebook outputs before you submit.
- Read the rubric first, then submit early enough to fix mistakes.
- The wrap-up links this project to the next steps in deep learning.
Check yourself
Answer each question first, then open it to check the answer.
1What is the main task in the capstone case study? a) Classifying land types from geospatial images · b) Writing a SQL database · c) Building a chatbot · d) Sorting text files
a) Classifying land types from geospatial images. The case study uses geospatial images labelled by land type, such as agricultural land.
2What does data augmentation do? a) It deletes the test set · b) It makes new training images with flips and rotations · c) It changes the labels to numbers · d) It stops the model from training
b) It makes new training images with flips and rotations. Augmentation applies random transforms, so the model sees more variety and overfits less.
3Why does the course train both a Keras model and a PyTorch model? a) To compare results and the effort in each framework · b) Because one framework cannot use images · c) To double the dataset size · d) To avoid using a GPU
a) To compare results and the effort in each framework. The same task in two frameworks shows the trade-offs in speed, accuracy and code effort.
4What kind of patterns does an early convolution layer learn? a) Full sentences · b) Database keys · c) Edges and simple textures · d) The class names
c) Edges and simple textures. Filters start with small patterns like edges, then deeper layers combine them.
5Which PyTorch layer applies a 2-D convolution? a) nn.Linear · b) nn.Flatten · c) nn.Dropout · d) nn.Conv2d
d) nn.Conv2d. nn.Conv2d is the 2-D convolution layer in PyTorch.
6What does MaxPooling2D do? a) It adds more channels · b) It increases the image size · c) It trains the model · d) It shrinks the spatial size and keeps strong features
d) It shrinks the spatial size and keeps strong features. Pooling takes the maximum in each window, so the map is smaller and keeps strong signals.
7What is the first step of a vision transformer on an image? a) It splits the image into patches · b) It flattens the image into one vector · c) It pools the image twice · d) It removes the colours
a) It splits the image into patches. A vision transformer turns the image into patches before embedding them.
8What is transfer learning? a) Moving files to a new disk · b) Reusing the weights of a model trained on another task · c) Copying labels by hand · d) Changing the loss function
b) Reusing the weights of a model trained on another task. Transfer learning starts from weights learned on a big dataset, not from random values.
9Why freeze the early layers of a pretrained model? a) Freezing makes the model smaller on disk only · b) Frozen layers always give 100 percent accuracy · c) They already hold useful features and this trains fewer parameters · d) It removes the need for a validation set
c) They already hold useful features and this trains fewer parameters. The early layers hold general features, so you train fewer parameters and need less data.
10When is generator-based data loading the better choice? a) When the dataset is too big for memory · b) When the dataset has one row · c) When there are no images · d) When the model has no weights
a) When the dataset is too big for memory. A generator reads one batch at a time, so the whole dataset never sits in RAM.
11Why keep a validation set? a) To train the model a second time · b) To check generalization and tune choices · c) To replace the test set · d) To store the labels
b) To check generalization and tune choices. The validation set is not used for training, so it shows how well the model generalizes.
12What does the final module ask you to submit? a) Only a written report · b) A link to a video · c) All the labs you completed in the course · d) A single screenshot
c) All the labs you completed in the course. The final grade comes from the labs you finished during the course.
Study and exam tips
Know the two framework spellings: Keras Conv2D and PyTorch nn.Conv2d.
- Remember the transformer order: patches, embeddings, self-attention, head.
- Link augmentation and dropout to the same goal: less overfitting.
- Check the submission rubric and file names before the deadline.