Thought Behind Things

The 21-year-old fixing Pakistan's traffic lights with AI

Muhammad Ahmad, founder of InLights, is a 21-year-old NUST student who taught himself computer vision, built a working prototype to automate traffic signals, and is now presenting to the chairman of the CDA. This conversation covers how he got there — and why he thinks Pakistan's engineers are sitting on a goldmine of unsolved problems.

  • Sep 30, 2022
  • 10 min read

A community recommendation that turned into something unexpected

The episode opens with Muzamil explaining how Muhammad Ahmad came to be on the show at all. Someone in the Thought Behind Things community had posted a video of a working proof-of-concept: a system that could read traffic density through a camera and adjust signal timings automatically, without a traffic warden standing in the middle of the road. Muzamil had always found the human-directed traffic signal “incredibly redundant” — a person doing a job that technology could handle — and here was a 21-year-old from NUST who had apparently solved it, indigenously, in Pakistan.

That framing sets the tone for the conversation. This is not a polished founder with a pitch deck. It is a final-year mechanical engineering student who taught himself computer vision online, built a prototype at home, and is now in meetings with the chairman of the Capital Development Authority.

From Faisalabad to NUST, via Oxford and a school that monopolised its neighbourhood

Ahmad was born in Faisalabad but grew up in Rawalpindi. His secondary schooling was at a relatively new institution that, by the time he left, had taken over five buildings from a single floor and was placing students in the top three positions of the federal board. He draws a direct lesson from watching that school grow: “Mujhe kuch aur seekha hona ho lekin yeh cheez wahan se zaroor seekh li — agar aapne jo cheez decide kar li hai, aap us par chalo.”

Before university, he attended a ten-day LUMS programme on modern disciplines — biotechnology, machine learning, astronomy — selected from over a thousand applicants. He then attended a two-week Oxford summer programme on full scholarship, submitting a portfolio of camera-based work he had made at home on his phone. His conclusion from both experiences was the same: “Rocket science nahin hai koi. Basically ek system hai.”

He chose NUST mechanical engineering over LUMS and over computer science, not randomly but after opening the course content of each programme on the university website and comparing breadth. Mechanical, he decided, touched automation, electrical systems, and programming at an introductory level, which gave him enough surface area to then go deep on his own. “Yeh cheezein main khud bhi seekh sakta hoon. Agar woh intro de dein mujhe, main ghar mein baithkar aise hi seekha hai maine programming.”

Teaching yourself computer vision on Fiverr’s dime

The startup did not begin with a grand plan. It began with a course. Ahmad found an Urdu-language computer vision course by a Pakistani educator called Bleed AI — he recommends it explicitly in the conversation — and started working through it. Midway through, he opened a Fiverr account and offered to complete client projects for free, using the assignments as real-world practice. “Assignments bhi kya aati hain — aapne koi application banaani hai. Toh maine basically free mein kaha ke aapko kaam karke doonga.”

He did two projects for free. On the third he raised his price slightly. The client agreed. He raised it again. They kept paying. “Us waqt yeh realize hua ke zaroorat hai.” The freelancing income validated the skill before InLights existed as a company.

Running in parallel was the traffic signal idea. Ahmad and his friends used to drive to F9 Park in Islamabad to play tennis, and he kept noticing the inefficiency at signals. He Googled whether it had been solved elsewhere — it had, in Australia, under a system called SCATS — and asked why it hadn’t been done in Pakistan. He started building a prototype using OpenCV. A first-year programming teacher at NUST, who had studied in Singapore and was a department head, saw what he was doing and told him to keep going without worrying about money. “Pehla jo push tha woh tha na, usne mera khayal kaam sara kar diya.”

The ambulance that made it personal

Muzamil asks at one point how Ahmad converted a technical curiosity into something he genuinely cared about. The answer is a specific memory. Ahmad was on Murray Road in Rawalpindi, near Liaquat Bagh, when he found himself stopped at a red light next to an ambulance. He could hear crying from inside. The signal stayed red. Nobody could do anything.

“Agar hum ek second bhi bacha sakte hain us junction par toh it’s a big thing.” He describes a cardiac infarction scenario — a clot blocking blood flow, every minute counting — and then imagines the inverse: a system that detects an ambulance, turns its entire route green sixty seconds ahead, announces to other drivers not to move, and resets to normal timing once it passes. “Jo woh jo banda jo patient hai, uske saath jo banda baitha hai andar, uski duaein nikleingi.”

That moment, he says, is what separated the project from a technical exercise. Economic efficiency arguments — less idling, less fuel waste — are fine, but “ek cheez hoti hai jo aapko kehti hai yaar ek sukh karna padega.”

Cold calls, a dead researcher, and a meeting with the CDA chairman

Getting from a working prototype to a government meeting required a long run of rejection. Ahmad cold-called Safe City, the traffic police, and the CDA with no references. “Ninety percent time you can guess kya hua hoga.” The standard response was a polite deferral.

His key observation from that process: “People actually care when you have done something.” Calling to describe a system you plan to build gets you nowhere. Calling to say the system exists and you want to demonstrate it is a different conversation entirely. He also learned to frame outreach around the bureaucratic incentive structure — mentioning an intelligent transport system project, naming the institution, signalling that something important was happening that the official might want to be associated with.

Eventually the director of the CDA’s traffic lights division, who had previously brushed him off by phone, texted after watching the prototype video. A meeting was arranged. Four or five officials attended. They acknowledged the work, then said it probably couldn’t be done in Pakistan — citing a researcher in their own traffic department who had been working on something similar and had since died in an accident. Ahmad demonstrated the prototype anyway. By the time of recording, the conversation had escalated to a presentation for the CDA chairman and the member for engineering, with a plan to pilot a single signal in Islamabad.

He is clear-eyed about why previous attempts failed. Lahore’s TEPA received millions of rupees in the Nawaz Sharif era to deploy a smart traffic system, brought in Huawei, and the project collapsed because no one had planned for maintenance. The CDA had installed SCATS controllers — an Australian system costing three million rupees per unit — at two locations, and those had also stopped working. “Yeh cheez inhon ne consider nahin ki — aur unhon ne company se kar liya, ab companies baahir ki hain. Paise lenge, zaahir aana hai paise do.” InLights, Ahmad says, will not hand over a shiny object and walk away. The maintenance and upgrade relationship has to be built in from the start.

Engineers and the myth of missing scope

Muzamil raises the question that comes up constantly in Pakistan: engineers graduating and finding no jobs, no scope, no path forward. Ahmad’s answer is blunt. Scope is not a fixed property of a field. Petroleum had the highest merit a generation ago. Mechanical had it ten years ago. Telecom had it after that. Software has it now. “Scope toh is tarah badalta hai.”

His deeper point is cultural. The average FSC student is offered two options — engineer or doctor — and then, within engineering, follows whoever in the family pointed them toward a particular department. The result is graduates who chose a field for its merit ranking rather than any genuine interest, and who then wait for a job that matches the credential rather than looking at the problems around them. “Pakistan ka engineer jo hai woh pata nahin koi magic pill ka wait kar raha hai. Halaanki yeh subah shaam ka dhandha hai. Yeh subah shaam ghar ban rahe hain, taare bich rahi hain.”

He gives the example of a construction project: civil engineering is only one layer. Plumbing, electrical, project management — all of it is engineering, all of it is being done in Pakistan the same way it was done in 1960, and all of it is waiting for someone to improve it.

Motivation, destiny, and a decision tree

Later in the discussion, the conversation moves into territory that Muzamil describes as unexpected. Ahmad talks about what actually drives him — not the economic argument for staying in Pakistan, not the career logic, but something closer to a personal reckoning.

He references an Elon Musk anecdote: when asked to motivate a group of students, Musk reportedly said that if you need external motivation to start a company, you should not start one, because the work is too intense to sustain without internal drive. Ahmad agrees. “Government hamein support nahin karti — yaar government support nahin karti toh bhai, aapne bahut achhi baat boli hai.”

Muzamil connects this to a broader point about legacy and purpose — the idea that a human life lived entirely in service of comfort and consumption is a waste of the only resource that cannot be replenished. Ahmad responds with a framework he has been carrying since roughly eighth grade: destiny is not a single fixed path but a decision tree, and God’s omniscience means knowing every possible branch, not just one. “Aap us mein na wapas ja sakte ho, na left right ja sakte ho, na hop kar sakte ho. Toh aapne yeh identify karna hai ke us decision tree mein se aapne kaunsa wala choose karna hai.”

Muzamil adds the law of attraction dimension — that when you begin moving toward something, the relevant people and opportunities begin to appear, not through mysticism but through the observable mechanics of how attention and action compound. Ahmad says this matches his experience exactly, citing the Saudi Arabia contact who approached him unsolicited after a small project, and who is now discussing franchising InLights in the Kingdom. “Aap ek qadam aage lete ho toh destiny bhi aapke taraf aana shuru hoti hai.”

Pakistan in 2050, and why the ratio is changing

By the end of the conversation, Muzamil asks Ahmad how he sees Pakistan thirty years from now, when Ahmad will be around fifty. The answer is careful. Ahmad says the future is an abstract noun — you cannot touch it or see it — but you can look at the youth in universities today and read the signal. He is honest that if current trajectories continue unchanged, he does not see improvement. But he does not think they will continue unchanged.

“Mere poore batch mein ek startup hai nikla hai. Mere senior mein ek startup nikla hai.” The ratio is small. But it is changing. And the change compounds. What Pakistan needs, he says, is for its heroes to shift — away from cricketers and toward founders, builders, and problem-solvers. “Aapko pata ho aapke jo super crisps hum khaate hain uska founder kaun tha. Chaikhana ka founder. Is tarah ke log hero hone chahiye.”

Muzamil closes by stepping outside the normal format to make a direct request to anyone watching with resources, connections, or experience in the relevant sectors: if you think you can mentor Ahmad or collaborate with InLights, reach out. “I would request people — if you think you can provide value… I think there is a leader in the making in the industries he’s in.”

Never miss a conversation.

New episodes and the thinking behind them, straight to your inbox. No hype, no spam, no pitch.

Muzamil Hasan speaking on stage