Lucky’s Status Report for April 30, 2022

This week I did the following tasks:

  • Integrated motion and object detection for live testing
    • Completed a function live setup
      • Used a webcam rather than raspberry pi uno to ensure functionality prior to dealing with increased complexity of raspberry pi
        • Use of single webcam to test out the pivot we recently decided which was to use a single camera for both motion and item detection
      • Physical parameters of setup
        • Camera placed 5 ft away from front of shelf and 3 ft above the found
        • Items Tested:
          • protein powder, quick oats, empty milk container, cereal, chia seeds, peanut butter, brownie mix, tuna, ziploc box, vegetable oil, paper towels
      • Recorded a video clip of the testing, and incorporated that into our final presentation
        • System was able to detect motion
        • Finite state control mechanism functioned properly to trigger the object detection
        • Object detection worked accurately – presence detection and bounding boxes were correct – for all of the items except the following:
          • empty milk, vegetable oil
  • Continued working on the video script
  • Worked on the project poster

In terms of schedule, I feel my biggest worry is setting up the wireless system with the raspberry pi’s and integrating control and file transfer with the website

What Next

  • Establish working system with wireless raspberry pi camera setup
  • Establish file transfer and control a.k.a. functional integration between raspberry pi and website

Team Status Report for April 30, 2022

An overview of what we did:

  • Allen and Lucky wrote the final presentation slides and Allen delivered the presentation on Wednesday
  • Since integration between the RPI and the web application had not yet been completed yet, Lucky copy and pasted the people detection code onto his laptop with a webcam and tested it with his existing object detection code. Everything seemed to work well with our initial testing (people were detected successfully, which then triggered his webcam to take a picture of the shelf, the picture was analyzed by the object detection code, and results were displayed on his screen.
  • Allen got the RPI to communicate with the web application and he’s in the process of doing the reverse. Once that is completed, Lucky will give Allen his code to integrate it with his web application.
  • Lucky continued improving on his object detection code to be more modular and into a library for Allen to use
  • Discussed what to put on the poster and will be finalizing the poster tomorrow

In terms of what we will do this upcoming week, we hope to do the following:

  • Finalize integration and testing
    • Connecting the web application to the RPI
    • Integrating Lucky’s code with Allen’s
  • Finish poster
  • Present final demo
  • Finalize research paper

The most significant risks that we know of thus far are:

  • Integrating RPI with web application
    • Although Allen had a decent breakthrough today, he still has to connect from the web application to the RPI. To mitigate this, he’ll do a similar approach from how he connected the system in the reverse direction.
  • Integrating object detection code with the web application
    • Although Lucky’s code is very modular and should have little/no trouble integrating with Allen’s code, we haven’t done it yet. We’ll aim to do this early in the week to give us wiggle room before the final demo
  • Latency i.e. meeting user requirements
    • After implementing the sliding window technique, we realized the algorithm could potentially take longer than intended, and may face difficulty in meeting the latency standards we set during the abstract and proposal time
  • Communication and storage in the integrated system

Changes To our schedule

  • We don’t’ have any significant changes to our schedule
  • If things continue to trend as planned we should be okay with some leeway for troubleshooting

Allen’s Status Report for April 30, 2022

  1. Worked with Lucky to create the final presentation slides
    1. After that, I wrote speaker notes and practiced my presentation while making sure I knew what my setup would be like for when I present
  2. Listened in and filled out peer review forms for everyone’s final presentation during class time
  3. Gave my team’s final presentation on Wednesday during class
  4. Discussed trade-offs/design changes with Lucky in terms of integration
    1. i.e. if integration with the RPI/ARDUCAM system and the web application fails, we can integrate the background subtraction code as a library to the laptop hosting the web application and use a wired webcam to run both people and object detection
    2. i.e. we could use the RPI/ARDUCAM to not only send a trigger to the web application to run object detection, but we could also send a picture to the app as well. This would allow us to seamlessly insert an image into the object detection code without the use of the external webcam.
  5. Worked on integration with the RPI/ARDUCAM and the web application (Very close to being finished!)
    1. I was able to send a trigger from the RPI to the web application and tomorrow I will try the same thing but in the reverse direction
  6. Discussed poster ideas with Lucky and will finalize the poster design tomorrow

I believe that we are on track for the final demo later this week. I believe we may have roughly one full day’s worth of work to do for the final demo. Hopefully we can do that asap so that we have a few days of slack time to polish up our system, run some more tests, and make sure everything is ready to go for Friday.

During this upcoming week, I plan to do the following:

  1. Finalize integration and testing
    1. connect from the web application to the RPI (using same mechanism from the reverse direction that was proven to be successful today)
    2. integrate Lucky’s object detection code with the web application
  2. Complete poster
  3. Complete final video
  4. Complete final paper

Lucky’s Status Report for April 23, 2022

This week I did the following tasks:

  • Worked towards integration
    • In order to make integration more seamless, I decided on the approach to include the object detection source code with the web app source code
      • This required transitioning the source code from a script that was to run on the raspberry pi camera subsystem to an internal library of functions that could be used by the web app using object oriented programming
        • This enables the web app to more easily supply the desired aisle and items, and receive the desired json object without too much hassle with transfer protocols
          • The web app will create a class instance for each aisle by calling on the object oriented library and supplying necessary information i.e. items expected in that aisle
          • Each class instance has its own set of functions for detection distributed detection for multiple aisles if needed
      • Also created a testing script for the library
  •  Began planning for functionality of displaying an image of the detected shelf (the idea was a cool feature idea from Prof. Savvides that we will try after completing MVP)
    • The overall programmatic design I am working on is
      • Produce empty shelf image base layer
      • As the sliding window moves through during detection, store the presence of items along with the x and y coordinates
      • For each item that was detected as present, use the x and y coordinates to add an additional image layer in the location where it was detected
        • The images will be preprocessed stored images for our global item set
  • Live testing and prep for demo
    • Finalized workable live capture code
    • Acquired groceries for testing and demo day
    • Began testing of live capture object detection
  • Final Presentation
    • Put together tests and visualizations for the presentation
  • Started working on the video script

 

In terms of schedule, I feel a bit pressured, basically hoping things go as planned, but preparing for when they do not, which is almost always the case for engineering projects. My biggest worry is the trigger mechanism between the background subtraction subcomponent and object detection subcomponent because it requires communication between multiple devices

 

What Next

  • Test, test, and more test, because we need to produce quantitative data and documentation of our decisions that we have made thus far
  • Finalize integrated system
  • Work on setup for demo
    • Cameras and shelf locations / distances
    • Script / overview of our demonstration
  • Work on video script
  • Storyboard poster components

Team Status Report for April 23, 2022

An overview of what we did:

  • Allen was working on the RPI (i.e. integrating background subtraction code and trying to integrate with the web application)
  • Lucky has been turning his code into essentially a library for Allen to use (i.e. takes care of integration between the web application and the object detection)
  • Lucky set up our shelf and is the process of testing items with his webcam and code

In terms of what we will do this upcoming week, we hope to do the following:

  • Set up the demo shelf parameters
    • Live testing of subcomponents
    • Finalize integration and interconnectivity
    • Complete poster
    • Start outlining how the video will be

The most significant risks that we know of thus far are:

  • Integrating RPI with web application
    • Connecting these two subsystems has been quite difficult thus far and for now, we have been simply trying to use HTTP post requests to keep things as simple as possible.
  • Latency i.e. meeting user requirements
    • After implementing the sliding window technique, we realized the algorithm could potentially take longer than intended, and may face difficulty in meeting the latency standards we set during the abstract and proposal time
  • Communication and storage in the integrated system

Changes To our schedule

  • We don’t’ have any significant changes to our schedule
  • If things continue to trend as planned we should be okay with some leeway for troubleshooting

Allen’s Status Report for April 23, 2022

  1. Integrated background subtraction code to the RPI (for people detection) and tested with motion (i.e. how much motion will we need to send a signal to the website since the motion detector is so sensitive? For example, we don’t want someone walking around in an aisle to trigger the object detection code multiple times when someone is still in the aisle.)
  2. Worked with Lucky to integrate our two systems together (i.e. he is turning his object detection program into a library for me to integrate to my web application to call on). He is still working on turning his code into a library. Once that is done, we will spend a day or so integrating.
  3. Researched ways to run a python script remotely (i.e. my computer to the RPI), ways to send data from the RPI to my computer, and more. This part was particularly painful this past week. What I’m trying to figure out is sending data from the RPI to the Flask server (through HTTP post requests), but I have been running into issues with having the RPI connect to the server (i.e. URL connection issues)
  4. Discussed what we are going to present for this upcoming week and how we plan to finish out these last two weeks.

I believe that we are on track since integration with the RPI is essentially all we have left in terms of the product. However, there are other deadlines too (i.e. poster, video, etc.) so we will try to finish integration as soon as possible.

During this upcoming week, I plan to do the following:

  1. Finalize integration with the web application and the raspberry pi
  2. Complete poster

Allen’s Status Report for April 16, 2022

  1. Completed the web application (includes some testing on user authentication, password encryption, protection from pages if you aren’t logged in, and more)
  2. Thinking about different methods for integration between the web application, the wireless transfer system (for the people detection), and Lucky’s laptop (for object detection)
  3. Playing around with integration between the three subsystems (i.e. getting one subsystem to run terminal commands from another subsystem; basically a client-server connection)

I believe that we are on track to finish and we will treat the final presentation date as a hard deadline to integrate all of the subsystems and finish testing. That would be the best case scenario, but if we do not, we will still have two weeks to finish before the final demo.

During this upcoming week, I plan to do the following:

  1. Continue integration with the three subsystems
  2. hosting web application on the cloud
  3. complete the final presentation slides
  4. Assisting Lucky and Takshsheel with anything that they need

Lucky’s Status Report for April 16, 2022

This week I did the following tasks:

  • Deeper research into more complex segmentation approaches
    • Upon further research and designing of sliding window I found some disadvantages to the approach
      • Fixed window size or aspect ratio can result in not capturing the full objects in windows or expensive computation
    • I learned about modern techniques that were developed to tackle that issue i.e. R CNN and Fast R CNN, Faster R CNN, and more
    • Therefore, I compared K-means, Mean Shift, and Graph Based segmentation
      • K-Mean: predefined number of clusters, randomly set centroids (will be the mean(s) i.e. the average of the colors in a cluster) for each cluster, assign each point to the nearest mean thereby creating a cluster, then recompute the means and repeat until the means stop moving i.e. convergence
        • Pros:
          • Not as complex as the other two approaches
          • Very fast
          • Multiple initialization methods can be used
        • Cons:
          • Manually have to set number of clusters
          • Sensitive to initialization
          • Sensitive to outliers
      • Mean Shift: for each pixel – first compute mean of the pixels in a surrounding window, then move the pixel’s assigned centroid to the new mean location, repeat until the mean converges to the nearest mode which will be the local extrema i.e. the hill of a normalized density feature mapping. Each hill will be the centroid of the pixels around them thus separating the pixels into clusters
        • Pros:
          • Simple algorithm
          • No initialization required
          • Robust to outliers
        • Cons:
          • Computationally expensive
          • Sensitive to window size parameter
      • Graph Based Segmentation: each pixel is a vertex, an edge is produced between neighboring pixels, each edge is assigned a weight based on affinity / similarity between the pixels/vertices, then the graph is partitioned to subgraphs where pairs of pixels in the same subgraph have a high affinity, and pairs of different subgraphs have a low affinity i.e. a min-cut
        • Pros:
          • Complex segmentation capabilities
        • Cons:
          • There is a bias to cut into smaller segments
            • Requires normalizing cuts to favor larger subgraphs
              • No known polynomial time solution for minimizing the cost of a normalized cut, but there are approximations
  • Upon comparing all of the solution approaches I used the following constraints:
    • Low computational expense and latency to meet user requirements
    • The camera is going to be fixed and the shelf is of a fixed size and distance from the camera
      • Results in images of fixed aspect ratio
      • Results in items having a constrained placement on shelf rows
    • We constrained the size of items for the scope of this project
  • Therefore, I decided that given the constraints and scope of the project, an implementation of sliding window would be the feasible design solution
  • Completed a functional sliding window matching algorithm
  • Put together the shelf we bought

 

In terms of schedule, I think I am around where I expected to be. I would like to move faster this next week though to give some more leeway for hiccups as we get our project to something worthy of a decent final demo.

 

What Next

  • Set up webcam and shelf with the following specifications to begin live testing such that the frame is composed of only the shelf for speed and accuracy since there would be minimal sliding window matching segments outside of shelf area
    • Distance from shelf to webcam:
    • Orientation of webcam:
      • Using SIFT matching which is supposed to be rotation invariant, but algorithm rotates test image for the sake of user visualization while testing
    • Height from floor of webcam:
      • Centered to shelf to allow for most forward facing camera angle of complete shelf
    • Figure out a set original captured Image aspect ratio and adjust sliding window accordingly

Team Status Report for April 16, 2022

An overview of what we did:

  • Allen and Lucky finalized the portions of their subcomponent projects
  • Tak, Allen, and Lucky are in the process of shifting to integration
    • Portiung Tak’s motion detection to the raspberry pi and camera module
    • Setting Lucky’s subcomponent with a laptop and webcam
    • Setting up the demo shelf

In terms of what we will do this upcoming week, we hope to do the following:

  • Set up the demo shelf parameters
    • Get the camera setups finalized (i.e. how far away, how high, what angles, etc.)
    • Live testing of subcomponents
    • Progress to integration and interconnectivity

 

The most significant risks that we know of thus far are:

  • Porting subcomponents to raspberry pi
    • We have already come to face difficulty in getting the motion detection onto a raspberry pi and figuring out communication
    • With delays and what not in getting the second raspberry pi, we may be forced to simply use a laptop and webcam for the object detection component and only one of the raspberry pi’s and camera’s for the motion detection
  • Latency i.e. meeting user requirements
    • After implementing the sliding window technique, we realized the algorithm could potentially take longer than intended, and may face difficulty in meeting the latency standards we set during the abstract and proposal time
  • Communication and storage in the integrated system

 

Changes To our schedule

  • We don’t’ have any significant changes to our schedule
  • If things continue to trend as planned we should be okay with some leeway for troubleshooting

Allen’s Status Report for April 10, 2022

  1. Performed our interim demo and demonstrated our individual subsystems as well as our updated schedule. Feedback was received and we are in the process of implementing the feedback in addition to the features we still have to do
  2. Improved upon the web application (i.e. added more views, designed more of the UI, and implemented more functionality). The web application is nearly complete (roughly 90% done)
  3. Set up the raspberry pi and camera system and familiarized myself with the tools and interface.
  4. Researched background subtraction algorithms to integrate with the raspberry pi
  5. Played around with using scripts to SSH into the raspberry pi, run commands, and return the result onto our local computer. This is essentially part of integration from the web application to the rpi/camera system.

I believe that quite a bit was done this week but we are a bit behind (because I would like to be done a week before our final demo to polish up anything). I think we can be in the thick of integration/testing by the end of this week and will reach out to the professors next Monday if things look too behind.

During this upcoming week, I plan to do the following:

  1. Continue integration with the web application and wireless transfer system.
  2. Research integration with the wireless transfer system and the object detection algorithm (Lucky’s computer)
  3. Finish the web application and hosting it on the cloud
  4. Figuring out how to set up our system and shelf/items
    1. i.e. will probably need to buy/find/make a shelf
  5. Assisting Lucky and Takshsheel with anything that they need