How to use AI to promote environmental sustainability

The environmental impact of trash and waste is huge. This contributes to the climate crisis, impacts wildlife, and damages public health. When the FX Digital team joined Microsoft’s three-day hack event in February, we spotted an opportunity to explore AI technology for good. We wanted to see if we could use AI to help the British public recycle their takeaway waste more easily.

As a digital agency, we specialise in voice and TV app development, but with a focus on research and development. During the hack, we learnt some valuable lessons. We wanted to share these to help other digital agencies and businesses who want to use their expertise for environmental good but aren’t sure where to start.

Identify the problem

Female developer coding on a Surface in the office, using Visual Studio. Hands on keyboard.It is no secret that the UK loves a takeaway. The delivery market has been booming in recent years, especially due to popular delivery services like Deliveroo, UberEats, and JustEat. Recently, these services have seen an even bigger surge, and have been providing a valuable service delivering groceries and essentials items to people across the country.

An often overlooked downside to takeaways and deliveries is the huge amounts of packaging waste generated by the industry. There’s often an array of cardboard boxes, polystyrene trays, and plastic containers leftover after ordering.

Government data shows that recycling figures are actually falling. One of the barriers to recycling is the confusion of what can and can’t be recycled. This is made more difficult as local councils and boroughs each have different rules and processes.

Finding the solution with AI

We wanted to use our tech expertise to benefit the environment. We also wanted to explore AI capabilities as a solution. As the increase of disposable takeaway containers continues to grow, our team thought about ways to engineer solution to help the public recycle.

That’s when we came up with Sort It Out. A chatbot that would tell users how to recycle their takeaway containers by analysing a photo. It would integrate an API with Azure AI services to make it easy and fun for people to access information on how best to get rid of their rubbish. In turn, it would encourage them to dispose of that waste responsibly and sustainably.

At the hack event, FX Digital set out to create a working API that would integrate with Microsoft’s Azure Cognitive Services. Here they discovered different ways to deploy Microsoft AI to create a sustainable solution to this environmental issue.

Deploying Microsoft AI effectively

Male developer coding on a PC laptop; working remotely. Hands on keyboard. Visual Studio on the go.First, the team built an API that retrieves the user’s coordinates. It then determines the area where the user is currently located using a popular map app and Postcode API.

Next, the team trawled the internet for as many different images of different takeaway packaging as they could find, from cardboard pizza boxes to polystyrene kebab trays. The team used these to train the AI model to recognise different packaging types.

They used Azure Blob storage services to temporarily store imagery submitted by users. Doing this reduces the size of the calls being done across multiple APIs. If these images were permanently stored, they could also be used to retrain the model and advance its machine learning. However, the team instead opted for a data dump of different container types. We did think about storing user images, but GDPR constraints may impact the storage of this data so opted out of that method.

The API was further developed to analyse a dataset and determine whether or not the container is recyclable in the user’s current borough, by pulling through information from local council websites. This presented a challenge, because the information on council websites is updated regularly. Unfortunately councils in the UK do not have an API that is easy to browse. Instead it is all consolidated in one csv file (our dataset) which the team pulled from the government database. Without the time to develop a more advanced solution, the csv file had to be added and updated manually.

Finally, we developed the function to analyse the picture sent by the user to the chatbot. Here, they used Azure’s Cognitive Services Custom Vision. Utilising AI to determine what type of container the object is (e.g. box, cup, bottle) and what material it is made of (e.g. cardboard, glass, plastic) and then tell the user how they can dispose of the rubbish.

Moving forward

Adult outside home on checking his Android mobile phoneWe learned valuable lessons from experimenting with AI. We realised this technology could be deployed to create innovative solutions. With the growth of the takeaway industry showing no sign of abating, the environmental burden must be shared by the takeaway industry, the Government and ourselves, the consumer. We all have the responsibility to ensure that we dispose of our waste responsibly and recycle as much as possible.

During the Microsoft hack event, the FX Digital team was able to utilise AI to create an API which is now being used to develop the Sort It Out chatbot. Although environmental projects are not FX Digital’s core business, we realised through this experience that we can use our expertise and AI technology to provide a service that could make a real difference to the environment.

Since finishing the hackathon, the team have been inspired to use their Friday afternoon personal development time to see the project through to completion. The ultimate goal is to have a chatbot that gives the user a smooth and informative experience, leading to better information and an increase in recycling. This chatbot could be used by delivery services to promote recycling with their users.

Sort It Out has inspired our team to use AI to benefit society in a small way. We hope other businesses may be inspired to do the same.

Find out more

Learn more about FX Digital and follow updates about Sort It Out

4 skills organisations can embrace to use AI for social good

Discover more ways AI can be used for social good

Sign the Partner Pledge to drive a sustainable and ethical tech sector

Tools to empower your development team

Watch the on-demand session: The 8 principles of sustainable software engineering

Listen to the Environmental Variables podcast series 

About the author

Photo of smiling man with dark hair and glasses, Ramsey MarwanRamsey is the Marketing Manager at FX Digital, a digital agency specialising in TV and Voice App Development. Working in an agency obsessed with Research and Development, you will often find him writing articles about the latest and greatest developments in new and emerging tech, from Voice technology to Connected TV, AR and AI. Ramsey and the team at FX Digital are always seeking new ways to solve complex issues. He believes marketing is a powerful tool to educate and inform, as well as spark debate and discussion, hoping that it results in innovation.