Author: Harry

ImgBot – A Discord Machine Vision project using the Azure Vision API

I’ve started a project this week called ImgBot. He’s a little Discord bot that uses the Vision API from Azure to recognise images posted to our HullCSS Discord server. As of now, he’s not super clever, only using the basic image APIs to gather data about a given image, but in the coming months I’m hoping to expand into a full Custom Vision model, for more advanced recognition.

For some idea of how it works, I’ve included a screenshot of the current version. In future, I’m hoping to allow users to give the bot feedback, to improve the model.

Discord Screenshot showing ImgBot recognising Nicholas Cage

ImgBot recognising Nicholas Cage

It’s also possible to get more advanced information from the bot, having it return the full JSON object representing the image.

Discord Screenshot showing ImgBot giving a full JSON object for the Nicholas Cage image

ImgBot giving more detail on Nicholas Cage

 

I might look to Open Source this project later down the line, once the code is cleaned and organised. It’s currently fully functional however a little messy.

Let me know what you think and how you think I could improve the bot. Interested in testing it out? Drop me a message!

Cyber Security Lecture – HullCSS 2018

This week, I presented a lecture on Cyber Security for HullCSS. It covered Personal security, securing Applications you build, and organisation security. This was part of the HullCSS lecture series.

 

I covered three main topics, Personal Security, Developing Secure Solutions, and Organisational Security. The overall presentation is highly top level and basic. It covers common vulnerabilities and issues, but doesn’t go into too much depth as to how to protect and mitigate.

Personal Security focuses on the topic of using Password Managers, Two Factor authentication and other practises to develop good habits, and keep your online activity secure.

Secure Solutions covers the top vulnerabilities in applications, and how to mitigate them. It also covers how to spot vulnerabilities and encourage developers to build good habits.

Organisation security covers possible flaws where staff may expose information. It suggests some ideas to reduce the chance of this happening.

 

If you want to check out the slides from the event, you can find them below. If you’d like a full copy of the presentation (Available as a Keynote or PowerPoint) including notes, let me know. If you’d like to use this in your own presentation, please ask first.

Presentation Link

Google HashCode @ Hull 2018

Yesterday (1st March 2018), a number of HullCSS students got together to compete in Google’s HashCode competition. Everyone managed to submit a solution and gain points, and great fun was had by all.

The Event

HullCSS (The Hull Computer Science Society) ran a HashCode Hub in the Fenner SuperLab, where teams from all over the University came together to compete. It was the first time HashCode was run at the University of Hull, and all students were welcome.

All teams managed to submit a working solution, with the lowest point total being 10 Million, and the highest being 45 Million. All were impressive solutions, with each taking a different approach to solving the problem. Everyone relished the challenge, and it was interesting to see all skill levels working together.

All teams were eagerly watching the scoreboard throughout the event. Everyone wanted to make it above the top 1000 teams (top 25%).

My team consisted of Josh Taylor, Alexander Rossa, and myself, and was named Gravity Gun. We kicked off at 5.45pm with the release of the problem (which you can find here), and got to work planning out our algorithm.

The Solution

We decided to take a Supervisor/Worker approach, with our main program acting as a coordinator of rides, and the cars doing much of the route finding/calculation themselves.

A basic set of properties were given to the car, to allow it to know about itself, such as its position, the rides it has completed, and the current global step it is on. This allows the supervisor to ask the car how long it will take to complete a given ride. The car is capable of calculating at what points it will pick up the customer, and arrive at the destination.

The supervisor knows more generalised information about the problem, such as the size of the grid, the list of cars and rides to complete, and the number of steps in which the rides have to be completed. It prioritised the list of rides, then asks each car how long it will take to complete the ride. In this version the prioritisation is very basic, and is only ordered by the end step in ascending order. It then gathers the results, and immediately removes any result that will complete after the maximum finish step of the ride. If the ride won’t complete the ride in time, we don’t even want to attempt it, as we could be using this time to get more points.

Next, it will check to see if any of the cars can achieve the bonus points. If they can, it will pick one of these cars, otherwise it will pick any car. It will then pick the car that reported the least number of steps to complete the job. This provides a fairly optimal path for completing rides (though clearly not the best!).

Conclusions

This model is fairly good, achieving 45 million points, though not without its faults. The top team managed to achieve over 49 million points. Given more time (there was a fair amount of time finding and fixing silly logic errors), we’d look to improve the prioritisation algorithm, looking at balancing the choice of going on a long journey, vs doing multiple short ones.

The competition was great fun, and I’ll certainly look to do it again next year. I’d encourage any student who wants experience with a real world, complex programming problem to compete! It offers something drastically different fromĀ  a University module, and it can be really rewarding to build a working solution. As a student, the challenge was really engaging, but not too difficult as to be unsolvable.

I’ll definitely be encouraging HullCSS to run the event again next year. If you’re in Hull and want to get involved, let me know. If there is enough interest, it may be that the Hub is opened up to the whole city!

Links

Want to know more about HashCode or get involved? You can find some info here:

https://hashcode.withgoogle.com/

 

Want to see my solution? Check it out on GitHub! (We were really tired, and were rushing when we wrote this, apologies in advance!)

https://github.com/HarryGwinnell/HashCode2018

 

Want to have a go yourself? Find the PDF problem here! And the inputs are here.

 

Why not check out my other projects?

A Student Guide to Amazon Alexa Skills

I presented a talk last week for members of the Hull Computer Science Society (HullCSS) titled ‘How to get a free Amazon Echo’. In the talk, I discussed the basics of what Alexa is and how skills work. I then gave a basic introduction on how students can get involved in developing skills for them. We covered topics such as how Alexa handles Natural Language, how to use AWS to handle data given to your skills, and the different types of Skills you can develop for Alexa.

 

If you’re considering building a Skill, and you’re a member of HullCSS, get in touch and I might be able to lend you an Echo Dot to test it out. If you’re getting to the final stages of your build, we can help you test it out. There’s a wealth of resources online if you need them!

PowerPoint

If you attended the course, or you’re curious and want to get started, you can find the PowerPoint linked below. It contains most of the information given, either on slides or in the notes. I designed this talk to be a beginners introduction to Alexa. You can find more resources online, from Amazon and other bloggers.

Get the Presentation here