Inspiration

Physical environment cues(lighting, composition) and facial expression 's management can largely decide whether a selfie is popular or not, which are commonly ignored by some people. BetterSelfies can make selfies more share worthy. We want an app that can tell us whether our selfies looks similar to popular selfies, and analyze the quality of components of selfies.

What it does

BetterSelfies is an artificial intelligence camera application that can take photos, or use photos from file, and determine if the lighting and facial expression is good enough. After a good photo is tested, users can directly share this photo to snapchat.

How we built it

We used xcode to build the main frame of the app. To set up the model and integrate the machine learning model to our app, we used Core ML framework. We get selfies dataset from the internet and write python code to seperate it into categories: high/low popularity; good/bad lighting; is/is not smiling. We then get a nicely trained model with high validation score. After integrating the model to BetterSelfie, we add a 'share' button to the view. In the action of its model, we implemented function with SnapKit to allow users to share photo to SnapChat.

Challenges we ran into

The dataset is not organized into the way we want it to be, so we had to write a python script to categorize it The dataset is imbalanced (# of photos with good lighting = >100x # of photos with bad lighting), so we have to balance it The don't have enough time to train the data set. The model was trained on a MBP for 10 minutes. Each tag has about 150 photos. The accuracy is only ~70%. Given more time we think we can improve the accuracy to >90% We had trouble submitting our app to the snapchat portal, which keeps telling us that an unknown error exists. That leads to our inability to get a client app. We were incapable of using snapsdk frameworks and have to comment out codes related.

Accomplishments that we're proud of

Managed to train an ideal machine learning model to analyze lighting and smiling. Allowed the app to both take photos and select photo from files. Implemented functions which allow app to share photo with snapchat.

What we learned

Training and integrating model with CoreML Ways to utilize available machine learning training dataset and catagorize photos into desired attributes Increasing machine learning validation correctness by adjusting dataset. Using SnapKit API to allow sharing photos to Snap Chat. Configuring API framework into xcode projects. Using Cocoapods.

What's next for BetterSelfies

More layers of traing for machine learning model and with better dataset. An algorithm to calculate popularity from recognized attributes of photo. Fully implement Snapchat related features.

Share this project:

Updates