An intern’s journal with HTX Sense-making & Surveillance Centre of Expertise

A nurturing environment with great leadership.

Tiong Kai 1
(Photo: Tan Tiong Kai)

Hello! I’m Tiong Kai and a final year undergraduate at Nanyang Technological University (NTU), studying Mechanical Engineering.

I chose mechanical engineering as my degree as I have enjoyed Math and Physics since Secondary School. The rigour of engineering has been exciting, but interestingly, my favourite subjects were Python programming, data science and artificial intelligence (AI). These were part of the foundation modules in my course, and that got me hooked as I was amazed by the versatility and power of programming.

I decided to pursue my newfound passion and took up several courses on Coursera on my own, from data science in Python, to introductory courses for front-end software development, and eventually an AI module during my summer exchange in South Korea. After exploring different aspects of programming, I found that I was most interested in the areas of machine learning and AI, and was keen to learn more in the areas of neural networks and deep learning.

To give myself a head start in the field of AI, I actively sought out internship opportunities in that area and during my final semester in NTU, I came across an opportunity to intern with Sense-making and Surveillance (S&S) Centre of Expertise (CoE) in HTX. I was hoping to get some hands-on experience in developing AI models as well as exposure to other related technologies such as cloud computing. So, I took a leap of faith and applied for a part-time internship with S&S CoE. It was on a 2.5 workday per week schedule for 4 months, as I had to allocate some time to complete my final year project and remaining undergraduate modules. As an Intern, I was given the opportunity to work on actual projects involving computer vision, video analytics and image enhancement. As someone who enjoys challenges, this internship has been extremely fulfilling and it gave me the hands-on opportunities that I had hoped for.

Projects that I Worked On

1. People Detector and Counter

The first project assigned to me was on Computer Vision. One of the most common applications of Computer Vision, is people counting for the purpose of crowd management. Traditionally, people counting involved stationing people with a clicker at various locations to manually count the number of people moving in and out. Today, with AI, this task of people counting can be fully automated.

My task for the project is to build an AI-enabled people counting solution that can be deployed for ad hoc purposes. There are currently many commercially available and open-source computer vision models for people counting. These are reliable, in terms of their performance, including the open-source pre-trained models. With this in mind, I was tasked by my supervisor to experiment with some of these open-source projects. The first is the YOLO (You Only Look Once) v8 model for people detection followed by the ByteTrack object tracking algorithm. These are State-of-the-Art (SOTA) models and algorithms that are capable of real-time detection and tracking.

To better understand how they worked, I started by reading articles on their architecture and their framework. Then, I looked at examples of how they were implemented using Python, to better understand the APIs and additional Python packages that were used alongside these models and algorithms. After this, I referenced some open-source materials to learn how to implement these models. Usually, these reference materials will not fit exactly to the use case and I will need to dig deeper into the code and learn how to modify them.

After researching, experimenting and asking around, I was soon able to modify the code to detect and count the occurrences of people within a video file. This is done whenever the centroid of people detected crossed a line boundary that was set. With this, I was able to calculate the total number of people entering an area by getting the difference in the counts of “in” direction and “out” direction. By the time my internship was over, I have implemented and tested a full working version of this people counting solution.

Tiong Kai 2Counting the number of people crossing a boundary where moving up is “out” and moving down is “in” (Image: HTX/Tan Tiong Kai)

2. Low-light Image Enhancement

One of my senior AI engineering colleagues at S&S CoE wrote an article to explain the capability of low-light image enhancement. In the realm of security or emergency situations, being able to enhance a low-light image to a more visible state is an important capability to have. However, light glares in these low-light images do adversely affect the image enhancement ability. In this project, I was given the task to look at reducing the effects of glare in images taken in low light environments.

Images taken in low light conditions can be affected by artificial light sources such as street lamps, headlights from cars, etc, resulting in a glare that can distort the images. Layer decomposition can be used for glare reduction. It is a technique for separating the glare component from the underlying image structure. Glare can be considered as an additive layer that overlays the original image, causing unwanted brightness or haze. By decomposing the image into different layers, such as the glare layer and structure layer, it becomes possible to selectively reduce or remove the glare while preserving the underlying details and structure.

To remove the glare component of the image, the layers of the image can be assumed to follow such an image-layer model:

I = R●L + G

where I represents the input image, G represents the layer with the light effect, and R●L represents the element-wise matrix multiplication between the reflection and shading layers respectively. This model assumes that the data from the layers R and L are not removed when layer G is removed. This method is mathematical, focusing on matrix manipulation using techniques such as the Fast Fourier Transformation (FFT) and filtering.

Tiong Kai 3Image before enhancement (left) vs image after enhancement (right) where glare was reduced (Photo: HTX/Tan Tiong Kai)

I referenced a set of MATLAB codes to obtain the structure of the algorithm. Code in MATLAB is not easily deployable and does not integrate with common deployment stack. Converting it to Python code would allow it to be more deployable and accessible. Since the method is mathematical, the MATLAB functions can be replicated in Python using established and performative packages such as NumPy and SciPy.

To make the conversion, I had to first understand the MATLAB functions and their Python equivalents. Then, I had to test the Python functions to ensure they are working as intended. Finally, I had to validate the script by running the Python code and cross-referencing its output with the output data from MATLAB. Give myself a pat on the back! I was able to successfully recreate the image enhancement algorithm in Python from a MATLAB script. The Python code is then passed on to my AI Engineering colleague to be integrated into the product known as InXeption.

Some of My Challenges

The first hurdle I faced was getting started in the field of computer vision and AI. As a Mechanical Engineering student, I lacked the technical foundation background compared to my Computer Science or Computer Engineering peers. Despite having experience in Python from my school projects, earlier internship, and knowledge of machine learning and AI, I was concerned that there are still many things that I am not familiar with. There are many aspects of programming that I need to work on, such as good programming practices, and various aspects of software development. So, I anticipated a steep learning curve and the need to acquaint myself with tools like GitHub and Anaconda.

On my first day at the office, I felt completely lost and unsure of where to begin. I was unfamiliar with my first tasks of creating environments in Anaconda and cloning projects from GitHub. Fortunately, my colleagues were very helpful and patient. They took the time to guide me through the initial process, showing me where and how I could find more information to get started.

My next challenge was to gain a technical understanding of how things worked within the realm of AI and computer vision. Initially, I was overwhelmed with the myriad of information and had difficulty finding and distilling the relevant information needed for my projects. Thanks to my supervisor who was patient and supportive, I was given clear directions on areas where I should focus. He even took the time to create customised example codes that I could reference and learn from.

In the field of engineering and technology, there will always be complex problems to solve and challenges to overcome. Whilst it seems intimidating and daunting, the culture and mentorship provided by my colleagues played a significant role in my development and helped me overcome these challenges.

Nurturing Environment & Good Leaders

If I were to summarise the success criteria for a great team during my short stint in S&S CoE, it would be:

“A nurturing environment with great leadership.”

Everyone in the department is super easy to approach! Besides the examples I mentioned earlier, there were many times that someone was always there whenever I needed help. Even though my work might be considered “less technically complicated” than theirs, my colleagues took the time to genuinely understand my problem and gave me advice on how to tackle it. The Director and Deputy Directors often checked in on me to make sure I was given guidance when faced with any difficulties. It is awesome how they have created such a friendly and supportive atmosphere within the team!

A nurturing environment with great leadership.

My colleagues are incredibly inclusive and always jio-ed (colloquial Singlish — meaning to ask or invite) me to join in their social activities like karaoke sessions and after-work runs. There were also other activities where I was invited to attend. These include the promotees’ lunch where they bought lunch for everyone and a StrengthsFinder workshop. They made sure that I was part of the team and not just an Intern. At the StrengthsFinder workshop, I not only discovered more about my own strengths and personality, but also my colleagues’. It was eye-opening to see how everyone approached problems differently and had unique perspectives on various issues. It helped me to appreciate the diversity within the team and broaden my own outlook.

Tiong Kai 4Group photo after the StrengthsFinder workshop (Photo: HTX/Tan Tiong Kai)

I felt like I was valued, which motivated me to do my best and contribute back.

I also admired the management style of the department leaders. They have ambitious visions for the department and can provide clear direction and guidance to the team, enabling smooth and efficient work. As an intern, I found the environment to be forgiving. On my first day, when I expressed my intent to learn quickly and contribute, the Director’s response was reassuring — “No pressure, just focus on learning as much as you can.” This allowed me to prioritise understanding concepts and learning, rather than be overwhelmed by meeting specific targets. There was a strong sense of trust amongst everyone in the department. I did not feel pressured or micromanaged.

Tiong Kai 5S&S CoE Department lunch (Photo: HTX/Tan Tiong Kai)


My Key Takeaways

During my internship, I had the opportunity to learn programming practices and gain valuable insights into AI and computer vision. My biggest takeaway is learning about the architecture of YOLO v8, which proved to be highly efficient compared to other object detection models. Understanding its underlying principles provided me with a good insight on how advanced algorithms can be used for effective object detection. With this newfound knowledge, I learnt how to build AI-enabled video analytics solutions with these computer vision techniques. I also gained hands-on experience in training and implementing custom YOLO models for object detection. It has been an invaluable experience for me to work on these projects with real-world use cases. None of which I would have been able to, within my NTU Mechanical Engineering course.

My internship also significantly bolstered my confidence in Python programming. Working extensively with Python throughout my projects honed my coding skills and exposed me to various libraries and frameworks commonly used in AI and computer vision applications. This experience has solidified my understanding of Python’s versatility and its significance in the field of programming.

Apart from technical knowledge, I also picked up key problem-solving skills. I learnt the importance of breaking down complex problems into smaller, manageable tasks. This approach helped me stay organised and focused throughout the projects. By tackling each task step by step, I was able to make steady progress and overcome obstacles more effectively.

More importantly, I’ve realised that perseverance and a growth mindset are key ingredients for success. Programming and AI projects can be challenging, and it’s important to maintain a positive attitude when facing difficulties. Embracing a growth mindset allowed me to view setbacks as opportunities for learning and improvement, ultimately helping me overcome obstacles and achieve my goals.

Next Chapter

My experience at S&S CoE has been truly enjoyable and rewarding. During my time there, I had the opportunity to cultivate and enhance my skills in areas that resonate with my interests. I was constantly challenged with complex problems that pushed me to think critically and creatively. What made it even more fulfilling was the chance to work on meaningful projects that had real-world applications. I would also like to share how one can pivot and transition into tech!

Transitioning from mechanical engineering to the field of technology is not easy. I had to formulate a strategy to make myself viable to opportunities in Tech. With an undergraduate curriculum that is not fully aligned with my interest, I had to squeeze out time to upgrade my knowledge in these areas and to explore if this is something that I enjoy. When I was certain that this is what I want, I made concrete plans to increase my chances of success in transitioning. In my case, I decided to deepen my knowledge of Python, and continued to build my foundation in Python from internships. I also increased my understanding of Tech and AI by taking up additional modules and online courses. I believe that if I persevere and focus on developing my skills, I will be ready when the opportunity arises.

Being exposed to the rigour of mechanical engineering has helped me stay resilient in the face of challenges. The hunger to learn new things propelled me to constantly explore and learn. In my opinion, these traits are important to ensure that the journey of development and growth is not seen as a chore, but rather something enjoyable and exciting!

I am extremely grateful for the opportunity to intern at S&S CoE and highly recommend this department to other undergraduates interested in gaining hands on exposure to computer vision, AI or even software engineering! After this internship experience, I have decided to pursue my interest in computer vision and AI. Since I enjoyed my internship with S&S CoE, I applied to the HTX’s Associate Programme. I am glad to share that I have gotten through all the interviews and have successfully re-joined HTX as a full-time employee under the Associate Programme. I am even more excited when I learnt that I will be posted back to S&S CoE. I now look forward to continuing my journey with S&S CoE and contribute to the safety and security of Singapore!

I hope my article will give all aspiring interns or fresh graduates a good perspective of working in HTX. If you are considering an internship or to apply to HTX, please feel free to connect with me and chat with me here if you have any queries! I will be happy to connect and share more of my experience with you.

drone box ops
Being Exceptional – Volunteering for Drone Box Ops
READ MORE
Sumedha and Farizah 1b-min
Putting university learning to work
READ MORE