Don't wanna be here? Send us removal request.
Text
1 YEAR IN CARDIFF - WEEK 2 - MSc Computing, Autumn Semester
1 YEAR IN CARDIFF – WEEK 2 – MSc Computing, Autumn Semester
Oh wow, I can’t believe I’m running out of things to write already – and it’s only been less than 20 days since I’ve arrived. 52 weeks of updating about my boring life here seem kind of a stretch. Traveling really is the least of my priorities while I’m here – I mean, there are nice places such as Swansea and Bristol that I could get to in less than an hour, but the prices are a little too high…
View On WordPress
2 notes
·
View notes
Text
1 YEAR IN CARDIFF - WEEK 52 - THE THIRTEENTH MONTH, FINALE
1 YEAR IN CARDIFF – WEEK 52 – THE THIRTEENTH MONTH, FINALE
“May those who accept their fate be granted Happiness, may those who defy their fate be granted Glory.” – Itō Ikuko
Technically speaking, I crossed the 1-year mark of staying in Cardiff long ago, but because I went back to Singapore for a time and since I was so busy with my project that I took a 3 weeks hiatus, I shifted my schedule a little and here we are – the last post of my (more than) 52…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF - WEEK 51 - INTERVIEWS
1 YEAR IN CARDIFF – WEEK 51 – INTERVIEWS
What a terribly busy week it has been for me – I completed my project demonstration earlier this Wednesday and attended my first in-person interview in the U.K. on Friday (didn’t get the job though – they called me 3 hours later!). I don’t think that I did really well because my presentation (and interview) and thinking on my feet skills are absolute shit. BUT still, I think practice makes…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 50 - HOTEL DEL LUNA
1 YEAR IN CARDIFF – WEEK 50 – HOTEL DEL LUNA
“Sometimes it’s not about having the strength to hold on, it’s about having the courage to let go.”
I never thought that the first thing that I’d do after finishing my dissertation report (which I’ve been working extremely hard on for the past 2 months) is to start on a new K-drama, but here we are. If not for my current circumstances right now, I would probably go radio silent and take a whole…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 49 - SCHOOL'S OUT
1 YEAR IN CARDIFF – WEEK 49 – SCHOOL’S OUT
I know technically it’s not Week 49 since I’ve not been updating for a while, and I missed the update last week because I was saving all my writing juice and motivation to focus on my 20,000 words report instead.
It has been 2 days since I submitted the last assignment for my MSc course, but things are not totally over yet – I still have a presentation/demonstration to give about my product next…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF - WEEK 48 - INTERMISSION/THE TWELFTH MONTH
1 YEAR IN CARDIFF – WEEK 48 – INTERMISSION/THE TWELFTH MONTH
I was going to write a short update about this while I was still back in Singapore, but I really don’t have the time right now to write anything. I have less than 10 days towards the submission of my dissertation and I’ve got to wrap things up. I’m about 40-50% done with the report and still a little bit more to go for my code that I’m really pressing to finish by tomorrow.
The last few weeks…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 47 – RETURN
1 YEAR IN CARDIFF – WEEK 47 – RETURN
Early update today as I have a long night ahead of me to pack half of my entire stuffs for my flight back tomorrow. It’s kinda an awkward decision for me to go back at this period when the deadline for my dissertation is just about a month away – but I think I have some important administrative matters to settle back at home and for me to plan out how to use the rest of the 4-5 months here until…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 46 - PREDICTIONS
1 YEAR IN CARDIFF – WEEK 46 – PREDICTIONS
“For the young, let me tell you the sky has turned brighter. There’s a glorious rainbow that beckons those with the spirit of adventure. And there are rich findings at the end of the rainbow. To the young and to the not-so-old, I say, look at that horizon, follow that rainbow, go ride it.” – Lee Kuan Yew
I can’t believe that it’s less than 10 days until my return to Singapore…and I’m still…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 45
1 YEAR IN CARDIFF – WEEK 45
2 more updates before I head back, and 7 more weeks left to the end of my course here in Cardiff. Again, there really isn’t much things that are going on with my life at the moment, besides waiting for the rejection e-mails for my job applications* and running into dead-ends with my dissertation project. I really should start to implement the Neural Network this week – I’ve been dragging my feet…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 44 – THE ELEVENTH MONTH
1 YEAR IN CARDIFF – WEEK 44 – THE ELEVENTH MONTH
“If you want to see philosophy in action, pay a visit to a robo-rat laboratory. A robo-rat is a run-of-the-mill rat with a twist: scientists have implanted electrodes into the sensory and reward areas in the rat’s brain. This enables the scientists to manoeuvre the rat by remote control. After short training sessions, researchers have managed not only to make the rats turn left or right, but also…
View On WordPress
0 notes
Text
If I haven’t already wrote this before or announced it yet, then I’ll first like to start this post by announcing that I’ll be heading back to Singapore some time next month for about 2.5 weeks. The (return) flight ticket has already been booked for just a mere £500 (it was ~£900-£1100 when I checked last November/December!), but I have to deal with a 7 hours transit at Doha airport. But that’s fine, because I’ll have my laptop with me and I’ll be busy using the (overall) 40 hours to-and-from journey to write my dissertation report, which is also the topic of this post. Efficient time management much?
The weather is starting to become cooler this week, but I don’t think it’ll start to actually turn cold until mid-August, or early September. I’ll still be coming back here for a couple of months to carry on with my job hunt – so far, I’ve sent out my CVs to various parts of the world – like Denmark, Japan, Germany and even in Thailand. The process to get a working visa is hard, but I’m somewhat confident that with my newfound technical skills and expertise, I should be able to get what I want.
Weekly spending:
14th Jul Sun Groceries: £5 Total spending: £2538.85
15th Jul Mon Total spending: £2538.85
16th Jul Tue Groceries: £12 Total spending: £2550.85
17th Jul Wed Total spending: £2550.85
18th Jul Thu Lunch: £4.70 Dinner: £10.40 Total spending: £2565.95
19th Jul Fri Groceries: £6 Total spending: £2571.95
20th Jul Sat Dinner: £9 Total spending: £2580.95
I actually wanted to write a short introduction about Neural Networks (which is highly related to my dissertation project), but at the moment, I don’t understand it enough to write much about it. In fact, I don’t even think I’m qualified to write about it at the moment, and I’m not sure how long it’ll take for me to understand it to a “passable” level.
Anyway, the main task of my dissertation project – and what I was working on for the past month and the coming 1.5 months – is to implement an algorithm that can detect and draw bounding boxes around all the insects in a given image. The insects in these images can be sparsely distributed or densely packed together. For the former, it’s not too hard to detect with the right parameters and pre-processing – but of course it’s not so simple either, like just using template matching. For the latter, I totally have no idea how to approach the problem.
To give a better idea, for the image below, it’s easy for me to make the computer detect the exact location of where the insects are because it’s so obvious. A simple find edges and contours algorithm will get me an accuracy of >50%, with a few false positives here and there on the wooden frame, and on the labels. Just last week, I finally found a way to measure the accuracy of the algorithm. Now, the challenge for me is to pump it up by 90% by finding the right hyperparameters (I hope I’m using the term correctly here).
Of course, I wish that my dissertation were that easy. The same algorithm that works on the above image will not work on the images below. The caveat is that I’m only allowed to use automatic methods only – that means that it’s not like I can just make a GUI to get the results that I want. So far, I’ve just started having all my packages and I’ve got a few algorithms on my list to try. Implementing them, however, is another problem.
Either way, I’m sorry that I cannot even provide a simple explanation of how Neural Networks work at the moment, but I can give a very brief overview on the image classification/Computer Vision process. This is by no means a detailed explanation of the overall process, but rather, what I understand from the process off the top of my head. Computer Vision is a really vast topic and there are so many things that you can explore at every step of the way. Hell, I can even spend 3 months on a research topic about the best pre-processing methods and write a 30-50 page report about that.
Pre-processing In any image analysis/computer vision project, the first step is to pre-process the image. There are a lot of things that you should do to an image first – like resizing it (simply because a 256×256 image will process much faster than a 3200×3200 image), removing the noise (usually, this means smoothing the image using some kind of blurring filter), and segmentation (the simplest being thresholding, to create a ‘mask’).
Typically, this step isn’t very hard. You don’t even need to apply any coding at this stage – even using Adobe photoshop or Microsoft Paint to crop the image or re-colorize some parts is already considered ‘pre-processing’. I tend to use ImageJ to try different filters on the image first to check the result, and then deploy the code on Python to get the same results.
Algorithms This part is the reason why I’m posting this so late – it takes FOREVER to train the CNN model, but I think it’s important to include this since it’s the whole point of this post. By far, the gold standard for any image classification/detection problem is the use of Neural Networks, which I’m trying to implement on my project (and I’m pleased to say that after many months of getting stuck in the installation process, I finally got TensorFlow and Keras up on Python. You see, I’ve been using Python 3.7 all these while and it’s not compatible with those packages for some reason. Then, I downloaded Python 3.5, and while I could make TensorFlow run, I had some problems with OpenCV. I was stranded there until just yesterday where I downloaded Python 3.6 and shifted all my packages and lo-and-behold, it works!).
If you’ve been following the news recently, there’s this “FaceApp” application that’s been going around that makes your face look older than you currently are. The magic behind it is something called “Generative Adversarial Networks” (GAN), which are a type of neural network. Of course, I’m not using GAN in my project, so there’s no need for me to find out more about it yet. Anyway, the key thing here is that Neural Networks are like, the hottest thing in data science right now. In the last 5 years or so, almost every image classification problem will first approach the problem using some form of neural network algorithm, and the results are very promising – with about an 85-95% accuracy.
Anyway, I copy-pasted a code from the TensorFlow tutorial website and trained it on a built-in sample dataset. The training took ~5 minutes (may be faster if I just ran it from the console) and the result is…wrong. It classified the image as a Coat with 100% probability, when it actually is an Ankle Boot. If you are interested to go through the whole process yourself, you are welcomed to try your luck at https://www.tensorflow.org/tutorials/keras/basic_classification.
BUT, as my professor told me, the problem with these deep learning techniques are that the “hard part” – the intermediate step of actually processing and applying the algorithm to the image – are already done for you by the experts. These days, you just need to install the packages, feed the correct input to the pre-written algorithm, train the model (which is automatic), and finally get the output. Then you just check if the output is correct or not and get some sort of a truth table. Unfortunately, for a graded project, it’s hard to give good marks for this because you are not actually “thinking” or coming up with your own solutions, but just piggy-backing on the works of others. There’s no merit to give for just downloading images and packages!
Computer Vision is something that I’m really interested in, but unfortunately, I did not have the chance to take up a module on this in my undergraduate or postgraduate education – other than a small, small part in my Biomedical Imaging module about simple thresholding. Everything that I have learned about this topic is purely from online sources, A LOT OF TRIAL AND ERROR, and a bit of luck (but I’ve been very lucky with my results so far). On the other hand, seeing that I didn’t do too well for my signals and controls modules, the nitty-gritty details in Computer Vision might just be too maths-intensive for me to comprehend.
Last but not least, although I’m still stuck at Andrew Ng’s Machine Learning course on Coursera, I think I managed to learn some similar content in my Database Systems module, which takes a more theoratical approach, rather than focusing on the mathematical details. I highly recommend anyone who has a month or so to enrol in this course because it’s perfect for absolute beginners – you just need the basic discipline and time to get through it, especially so if you are bad at maths.
Results Finally, the last part of any image classification problem is obtaining the results of the classifier – that is, how well or not well did the algorithm perform. At first, I thought it was something so simple like just getting a truth table by counting the number of algorithm-generated matches and comparing if it matches with the ground truth rectangles, but it was more complicated than I assumed that it took me 2 weeks to figure it out!
Even at this step, there is no one fixed way to get the accuracy of the algorithm – and this all depends on the images that you are dealing with, like how many samples are there in an image? Say you have a dataset of 50 cat images and 50 dog images – each image contains either only 1 cat or 1 dog.
You have an algorithm that determines if a cat is present in the image. You apply your algorithm and you will have a list of cat images that are correctly identified as cat (true positive), cat images that are incorrectly identified as not cat (false negative), not cat incorrectly identified as cat (false positive) and not cat correctly identified as not cat (true negative). Okay, this is still a little confusing to me, even if I have been dealing with a question like this for every year since polytechnic, but I think I got it correctly (pardon me if I made a mistake – how shameful!). Anyway, you sum up all these numbers and you get some sort of a final value from 0 to 1 that tells you how good your model is – in the best case scenario, all of your 50 cat images are correctly determined as cat images, and all of your 50 dog images are correctly determined as not cat images. TP = 50, FP = 0, TN = 50, FN = 0.
You can just find the accuracy using the simple formula of TP + TN / (TP + FP + TN + FN), which you will get 1.
In my case, it’s not so simple because I have many different kinds of boxes in one image – how do I calculate the accuracy of my algorithm?

The quick answer is that I used something called the “Jaccard Index” to get the overlapping areas, and from there, get the number of True Positives, False Positives and False Negatives (True Negatives are not taken into account because there is simply no way to get them, unless perhaps you count it at a pixel-level). Then, I find the Precision and Recall for the algorithm and finally calculate the F1 score, which is the measure of how “good” my algorithm is.
I’m going to stop here because I really didn’t think that I’ll be writing about something so technical, and besides, I have better use for my time anyway, like ACTUALLY working on my project instead of writing a blog post about it. On the side, I’m also watching 1 or 2 lessons on YouTube every day about Neural Networks, and I highly recommend this as an advance course after taking Andrew Ng’s Machine Learning course.
youtube
Signing off, Eugene Goh
1 YEAR IN CARDIFF – WEEK 43 – PROJECT If I haven't already wrote this before or announced it yet, then I'll first like to start this post by announcing that I'll be heading back to Singapore some time next month for about 2.5 weeks.
0 notes
Text
1 YEAR IN CARDIFF - WEEK 42 - RESULTS
1 YEAR IN CARDIFF – WEEK 42 – RESULTS
Finally – 7 weeks after sitting for my last examination – I received my results! I am pleased to inform my dear readers that I (fortunately) don’t have to retake any modules this coming August, and I can finally go ahead with my original plan. What’s now left for me is to clear my dissertation topic – which is a real bitch because I’m finally at that level where “there are no fixed answers” and I…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 41 - RETURN TO AZEROTH?
1 YEAR IN CARDIFF – WEEK 41 – RETURN TO AZEROTH?
Week 41 in Cardiff and I’ve made made significant progress with my quality of life this week. For the first time ever – just a few days ago – I finally found the motivation to use the rice cooker to cook rice and boil soup. The bad news is I got one of my finger scalded by the hot steam coming out from that damn thing. Previously, I would just use my metal pot to cook soup, but it’s not very…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 40 - THE TENTH MONTH - WARNER BROS. STUDIO: THE MAKING OF HARRY POTTER
1 YEAR IN CARDIFF – WEEK 40 – THE TENTH MONTH – WARNER BROS. STUDIO: THE MAKING OF HARRY POTTER
“The stories we love best do live in us forever, so whether you come back by page or by the big screen, Hogwarts will always be there to welcome you home.” – J.K. Rowling
And so, I have finally entered the double-digit mark for the number of months stayed in Cardiff/the UK! 12 weeks left to go to the end of this course – converting that into fractions, then we have also just entered the last…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 39
1 YEAR IN CARDIFF – WEEK 39
A late update this week because I’ve been out traveling around the capitals of Great Britain (London, Edinburgh, a quick stop at Birmingham and finally back to Cardiff), visiting the places that I’ve already been, but with my family this time. To squeeze the itinerary into just about a week means that we have to travel a long distance every other day, which is (ironically) tiring despite being…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 38 - JOB HUNT
1 YEAR IN CARDIFF – WEEK 38 – JOB HUNT
Happiness is the consequence of personal effort. You fight for it, strive for it, insist upon it, and sometimes even travel around the world looking for it. You have to participate relentlessly in the manifestations of your own blessings. And once you have achieved a state of happiness, you must never become lax about maintaining it. You must make a mighty effort to keep swimming upward into that…
View On WordPress
0 notes
Text
1 YEAR IN CARDIFF – WEEK 37 – DALARAN HEIST
1 YEAR IN CARDIFF – WEEK 37 – DALARAN HEIST
It has been two weeks since I had sat for my last examination paper (hopefully, if I don’t fail any modules) in Cardiff and right now, I’m just eagerly waiting for my results so that I can plan how the next few months will go for me. I have been carefully planning my options on where to go next from here, while also doing some preliminary research on my dissertation. It sounds crazy to start it…
View On WordPress
0 notes