Status Reports

Team Status Report for 11/16

What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

The most significant risk that could jeopardize the success of the project is the usage model accuracy. We were able to successfully train our clothing and color classification models, but our usage model is struggling to produce useful results, as discussed in our weekly meeting. This risk is being managed by our feature which allows users to correct and confirm the labels of each piece of classified clothing.

Were any changes made to the existing design of the system (requirements, block diagram, system spec, etc? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

No changes were made.

Provide an updated schedule if changes have occurred.

Our schedule has not changed.

This is also the place to put some photos of your progress or to brag about a component you got working.

Photos of our progress are located in our individual status reports.

Now that you have some portions of your project built, and entering into the verification and validation phase of your project, provide a comprehensive update on what tests you have run or are planning to run. In particular, how will you analyze the anticipated measured results to verify your contribution to the project meets the engineering design requirements or the use case requirements?

Validation is usually related to your overall project and is likely to be discussed in your team reports.

Our verification tests are discussed in our individual status reports.

Our validation tests will be ensured that our camera can take sufficiently clear images of our clothing for our classification models. Our models expect 224×224 images, and our camera can take images with a variety of resolutions, all sufficiently high enough to be scaled down to 224×224, so our camera will meet our requirements. Our camera also allows us to have higher resolution images to display to the user, since 224×224 images are grainy to the human eye.

Our validation tests will also verify that our classification models are compatible with the Jetson and that the Jetson is capable of predicting a class with each model in under 1 second. We have already validated that our .keras models are compatible with the Jetson by uploading them onto it. We will validate that our Jetson can run inference in under a second by using the camera to take at least 10 images of clothes from our own closet and feeding them through each of our three models. We will time how long it takes for each model to classify the image, and determine if the average inference time meets our 1 second threshold.

We will also validate that the Jetson can accurately send the classification results to the backend for storage in the database, and image folder. After the model classifies images of clothing, the Jetson will send the data as a POST request to the backend. We will validate that the backend will parse the data, add the clothing information to the database, and add the image file to the images folder. For our metrics, we will verify that the data in the database accurately matches the information sent from the Jetson. We will also confirm that the image is saved under the correct image file name, that matches the entry name for that item in the database. For speed, we will measure the time taken from sending the POST request to receiving confirmation from the backend. The goal is to meet a latency requirement of under 4 seconds for classification and storage.

Our validation tests will verify that the application accurately generates outfits based on the user’s request, and weather, along with user preferences and wardrobe data stored in the database. The outfits should meet our speed and accuracy use case requirements, and should be displayed on the frontend.

Alanis’ Status Report for 11/16

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours.

I ended up being unable to use the EfficientNet architecture because of a bug which I discussed in our weekly meeting this week. However, I retrained our colour and clothing type models using a balanced dataset and tried our the ResNet50,101, and 152 architecture. The ResNet152 performed best for clothing type classification and the ResNet101 performed the best for color classification, each reaching a validation accuracy of 65-75%. I also manually compiled a small dataset of 80 images(including at least 5 examples from each type and color class) which I used as a sanity check to ensure that our models performed well on the types of images that Style Sprout users would take. This spreadsheet includes the accuracy for the ResNet50 and ResNet152 versions of the models, and I will update it to include the accuracy for the ResNet101 after training is finished. 

I also did some troubleshooting of our usage model since it was only outputted the “sports” usage(which has now been switched to casual). My troubleshooting, which included running the 3 tests discussed in our weekly meeting, and I have determined that my next course of action is to try and determine the usage for less categories. This means determining only if clothing types like tops and skirts are formal or casual and ignoring clothing types like blazers and jeans, which are inherently either casual or formal. 

I also worked with Gabriella in person on Monday to test the uses until dirty feature. We had to make a couple of changes to our backend and frontend, which are located on our Github, but were able to successfully complete this feature. I also added the ability to display a variable # amount of pictures when an outfit is generated. Before, it only displayed a top and bottom, however now there is the ability to show outfits with 3 pieces of clothing(jacket, top, bottom), 2 pieces of clothing(jacket and dress, top and bottom), or 1 piece of clothing(dress). This is located on this branch on our Github.

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

My progress is on schedule.

What deliverables do you hope to complete in the next week?

In the next week, I hope to finish the usage model and continue helping Gabriella with the backend/frontend. 

Verification Tests:

I tested the accuracy of our models in two ways. Our dataset was split into two parts, training and validation(training is 80% of the original, validation is the remaining 20%). When training each model, the validation dataset was used to measure the performance of the model. For the clothing type and color classification models, the validation accuracy ranged from 60-70% depending on the architecture that was used. Since each model is a 1-of-k classifier, where each image belongs to one of k classes, the validation accuracy is categorical accuracy, meaning # of correctly classified images/total correctly classified images. A correctly classified image is an image where the predicted class is the same as the actual class. 

I also tested the accuracy of our models using a small dataset of 80 images containing 5 examples of each of our 16 possible clothing types and about 6-10 images for each of our 12 colors. I manually compiled this dataset. I evaluated the predictions made by our models using categorical accuracy and a spreadsheet linked earlier in my status report. I haven’t finished checking the accuracy for the ResNet101 clothing type and color models since they are still training.

However, it is highly likely that none of our models will meet the 80% accuracy use case requirement we had for classification accuracy. We are supplementing this with the additional feature of having the user confirm/correct the labels produced for each piece of our user’s clothing, which should correct any incorrect labels to achieve a 100% accuracy for clothing classification in our database.

Riley’s Status Report for 11/9

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours.

This week I coded up an endpoint to send the data to the database and added the required modules on the Xavier NX to achieve this (fastapi, config, msql). Additionally I tested out the code to take pictures only after certain user input. The user input was tracked correctly, but something went wrong with opencv where I got an error message “cannot query video position: status=0, value=-1, duration=-1,”. 

I ensured that the camera worked as expected using the qv4l2 gui. And I did have to fix an issue with it only showing a green screen, but I got the camera to work again. 

Even with the working camera the cv library wasn’t able to take a picture using the opened camera. This is an issue that I will be heavily troubleshooting next week as it is essential and not a hardware issue. 

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

Slightly behind schedule due to the camera not being able to take pictures but assuming that works as expected next week when I put more time into it, I will catch up.

What deliverables do you hope to complete in the next week?

Fix the camera issues, mock up a breadboard and connections to detect input on the pushbutton, and meet with Gabi to test sending data to the database from the XavierNX.

Gabriella’s Status Report for 11/9

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).

This week, I worked on setting up the reinforcement learning for our outfit generation.

I added functions to our backend that will reset the number of times an outfit has been used when users do their laundry. I also added a function that will increase the number of uses in the user_preferences table for clothing color preferences. Both of these should be triggered when users select an outfit in the frontend.

I had some issues with the frontend not working this week as well, and had to debug and install Visual Studio.

Besides this, I wrote a script to create queries for adding all of the new color pair entries to the user_preferences table. The table now has all 91 entries. Here are a few.

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

I am on schedule.

What deliverables do you hope to complete in the next week?

Next week, I want to link the new functionalities to the front end and make my final updates to the outfit generation algorithm.

Team Status Report for 11/9

What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

The most significant risk that could jeopardize the success of the project is the classification accuracy, same as last week. We are managing this risk by retraining our models, which have achieved higher accuracy than we were getting before. We are also managing this risk by working with a “default” model on the Jetson which has a low accuracy. By using this, we can continue to develop our code on the Jetson and integrate all parts of our system without being slowed down. Later, we will be able to switch out the default model with our actual models. 

Were any changes made to the existing design of the system (requirements, block diagram, system spec, etc? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

If we have time at the end of our project, we will add functionality to our system that allows the user to change incorrect labels. This will be an additional page which will show all scanned and classified items which have not yet been verified. If the user wants to, they can go through this page and update any incorrect classifications and confirm correct classifications. After pieces are confirmed, they will be removed from the page. Also, even if users do not confirm or change the classification labels of pieces, they will still be in our database of the user’s closet so this feature is optional to use.

We also added a push button to the design, to limit the amount of pictures that will be taken and ensure that the user has the clothing ready and prepared when the picture is taken. The costs are minimal (15$) and will not dramatically change the architecture.

Provide an updated schedule if changes have occurred.

Our schedule has not changed. 

This is also the place to put some photos of your progress or to brag about a component you got working.

Photos of our progress are located in our individual status reports.

Alanis’ Status Report for 11/9

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours.

This week, I worked on retraining our classification models, focusing on the clothing type classification model. I tried out the EfficientNet architecture, which from my research, outperforms ResNet while maintaining a low classification time on edge devices. I reprocessed our DeepFashion training data because it had been cropped incorrectly with this code. I then applied image augmentation to boost the training accuracy, the code is located here. I experimented with various combinations of image augmentation and architecture, and improved the performance from last week by 20% to 70% by using the EfficientNetB4. 

While training models, I tried to find an alternative to training on my local device. I looked into CMU provided machines, however they reset every night which would interfere with the training. I also looked into using Google Colab, however the free version would not let me upload a zip file of my training data. Also, the free version runtimes are limited to around 2 hours, and even sped-up training on a GPU would take longer than that. I also signed up for a free trial for Google Cloud to utilize Colab Enterprise, however it still would not allow me to upload my training data and runtimes were limited to 17 hours, which is shorter than the training time. I will ask more about alternatives to local training during my meeting next week.

I also worked on the frontend. I added functionality to the Settings button which allows the user to input how many times a piece of clothing can be worn until it becomes dirty. This included adding a popup when the Settings button is pressed, adding an integer input field to the popup, and adding an API call when the input is entered. I also added a basic API outline to the backend code which will be updated next week with functionality of changing the setting on the backend. The frontend code is located on this branch and the backend code is located here.

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

My progress is on schedule.

What deliverables do you hope to complete in the next week?

Next week, I hope to start retraining the usage model. I also hope to finish the functionality for the settings button. 

Gabriella’s Status Report for 11/2

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).

This week, I added a few new features to the frontend application.

I reworked the frontend again to include a new page for the generate outfit feature, instead of displaying a popup on the main page. This new page still displays the dropdown for selecting an outfit type, but also allows users to generate as many outfits as they want and select their favorite. I also added displaying the outfit images to this page. Here is an example of a generated outfit in the new page. This works by selecting the outfit type, and then submitting that request to the backend which returned a generated outfit along with the imageUrls for the top and bottom. The application then displays images of the outfit based on the imageUrls pointing to the files in the server.

Aside from this, I also added the new user_preferences table to the database. The image linked displays the table structure, along with the color pair I currently have added.

The application now is now linked to images on the server, the backend, and the database.

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

I am on schedule.

What deliverables do you hope to complete in the next week?

Next week, I would like to add all of the color entries in the user_preferences table. I also want to update the table from the frontend based on the outfits that users choose. I also would like to finalize the outfit generation algorithm. If I have extra time, I would like to add some more dummy testing data.

Riley’s Status Report for 11/2

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours.

This week I created the framework to take constant images and put them into the model. Unfortunately, due to other courses picking up in this time period for me, I was unable to complete more than that, specifically referring to my desire to link up the image and model results with the backend API. 

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

On Schedule still, I will work more next week Friday and Saturday after my work clears up.

What deliverables do you hope to complete in the next week?

Next week I hope to, with the help of Gabi, be able to link up the Jetson with the backend through the use of an API. Additionally, I would like to test inputting an image into a default model to ensure the acceptance of the cv image type. 

Alanis’ Status Report for 11/2

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours.

This week, I finished drawing the background image of our app for the frontend. It looks like this:

I also began testing our clothing type, color, and usage models with various pictures of pieces from my own closet as well as online secondhand stores like Depop. I chose to source some pictures from Depop as we want to test our model with pieces from all possible classes. However, we don’t own enough clothing from certain categories(orange, blazers, rompers). However, I realized that we would be able to find pieces of clothing from these categories on online secondhand shops where people would take well-lit pictures of their own clothes to sell which would help supplement our testing data. It was during this testing that I realized that our usage and clothing type models struggled to achieve high accuracies in practice. For example, our model classified the below image as beige, casual, and a dress which is correct.

However, clothing type and usage classification were frequently incorrect. Our models classified a tank top as a blazer and pants as a top, while always outputting a casual usage type even for formal clothing. I realized that this was due to an incorrect training data set. I had initially misunderstood what having a “balanced” dataset means and thought it meant that you need to have enough training data for each class past a threshold.

However, I realized that the amount of data present for each class should also be equal. The accuracy of my clothing type and usage models was inflated since some classes had much more data, like tshirts and casual clothing, while the color model was trained on a dataset where each class had a similar amount of data. Since the imbalance of my dataset was severe for the clothing type, with categories like Tshirts having thousands of examples and categories like blazers having just over 100, I had to source more.

I returned to using the DeepFashion dataset. This dataset was initially insufficient for us because it didn’t label images with all the attributes appropriate(most images were missing color labels). However, it does have many labeled clothing images which works for our application since we are only classifying by color. The updated training and processing code is on our Github. I trained the ResNet50, which reached 50% accuracy. I am also training the ResNet101, which has more layers/parameters, to try and achieve a higher accuracy. If the accuracy of ResNet101 is still insufficient, I will pivot to a different architecture like EfficientNet. 

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the proiect schedule?

My progress is on schedule.

What deliverables do you hope to complete in the next week?

In the next week, I hope to retrain the clothing type and usage accuracies to be more accurate. I also hope to continue helping Gabriella with the frontend and helping Riley integrate the trained models onto the Jetson.

Team Status Report for 11/2

What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

The most significant risks that could jeopardize the success of the project is the accuracy of our models. We are retraining them for reasons discussed in detail in Alanis’ individual status report. These risks are being managed by retraining, but we have also established the contingency plan of having the user confirm our classifications. This would mitigate insufficiently accurate classifications by allowing the user to switch incorrect classifications, ensuring the accuracy of our outfit generation.

Were any changes made to the existing design of the system (requirements, block diagram, system spec, etc? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

No changes were made to the existing design of the system. Changes will be made to our backend/frontend to allow users to confirm the classification if we cannot achieve sufficient classification accuracy.

Provide an updated schedule if changes have occurred.

Our schedule has not changed. 

This is also the place to put some photos of your progress or to brag about a component you got working.

Photos of our progress are located in our individual status reports.