Background
Data Collection
Florist Image Processing
Convolutional Autoencoder
k-Means Clustering
Evaluating the Model
Building a Recommender
Recommender Application
Conclusion
Next Steps
Tech Stack
On Wedfuly, clients work online with wedding planners who help with the planning process, including choosing wedding vendors such as florists, photographers, and bakeries.
The goal of this project was to build a recommender that facilitates the process of wedding planners suggesting vendors to their clients. For the first part of this project, I focused on florists with the goal of training a model to meaningfully cluster floral arrangements (bridal bouquets specifically). As a second step, I built a similar recommender for photographers using pre-labeled images of Wedfuly photographers.
Images of bridal bouquets collected online (train set: 2897, test set: 637) Images from Wedfuly wedding photographers (~1200)
- Cropped bouquets from images
- Centered bouquets and cropped images to square
- Resized images to 100x100
- Converted to RGB
- Augmentation: LR, UD
loss: 0.0140 - val_loss: 0.0142
Isolate encoding layers:
get_encoded = K.function([cnn_model.layers[0].input], [cnn_model.layers[5].output])
Pool filters from the encoded layers to see where model is paying most attention. Taking max() of filters is standard method.
Next pool up to the last convolutional layer in the model. The images on the right show the max of the filters. Bright spots are where the model is activated the most -- seemingly bright things and contrasts.
Clustering with k-Means - 7 was optimal k
To evaluate the model, I googled "bridal bouquet" and chose 40 of the top images to mimic the process of clients adding images to their Pinterest board.
k-Means cluster labels became a feature of an overall model that also included the following features:
- Total price
- Location of wedding - Boulder, Denver, Foothills, Summit County, Mountain Town Not Listed, Other
- Method of delivery - Delivery (full service), Delivery (no service)/Drop-off, or Pick-up
- Services provided - Ceremony Decor, Reception Decor, and/or Handhelds
- Size of wedding
As clients enter specifics of their wedding as well as select images that match their style, cosine similarity will be calculated to find the vendor that has provided wedding services that are most similar to the clients needs.
A recommender application built on Flask and Docker and hosted on Amazon Web Services allows clients and wedding planners to enter specifics of their wedding and select images to recommend vendors.
Even with limited training images, a k-Means algorithm on top of a CNN autoencoder has potential to cluster images for recommendation purposes. Using k-Means cluster labels in addition to features related to the wedding provides a more robust recommender system that takes into account the specifics of the wedding as well as clients' style.
- As Wedfuly grows and more data is collected, the recommender will be further fine tuned and validated
- While manually cropping bouquets was sufficient for this initial model, in the future, training a neural network to detect bouquets may be worth exploring
- Using transfer learning such as XCeption may also be considered in the future to detect features in images