Takshsheel’s Status Report for April 30, 2022

This week I worked on the following tasks:

  • Attended class and reviewed final presentations for the remainder of the team’s.
  • One out of the 2 counter setups and algorithms was not compatible with a raspberry pi with the camera system, so made it compatible by changing camera parameters and system paths to the camera as well.

This week I’ve not put in nearly enough effort into the class and the project since I focused my attention on the midterms/finals that I had to take 3 days in a row, however, currently, my schedule allows me to put in all the time that I’ve missed out on in the time being, in the coming week. Hopefully I can put in a justifiable and solid amount of time and effort that is expected for the project.

In terms of schedule, I’m still concerned about the porting of the counter code onto our integrated system, however, in the event something goes wrong, I don’t think it should be incredibly long to fix. We should be okay for team schedule in terms of finishing our product for the demo.

For the next week, I hope to have the following deliverables:

  • Final poster
  • Final decisionmo
  • Fully integrated system with counter code
  • Final report
  • Final demo

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

Takshsheel’s Status Report for April 23, 2022

This week, I worked on the following tasks:

  • Built a second counter program that instead of telling us how much traffic is in and out of a section, gives us information about how many people are present in the aisle.
  • Tested the implementation for various distances, varied number of people, and also checked for false positives.

In terms of schedule, from a preliminary standpoint, things are looking like they should be okay, the background subtraction and detection integration is underway, and provided things don’t catastrophically fall apart, we should be okay prior to the final demo. However, there’s also the risk of creating code that might not work with the other subsystems, and for counters, the integration hasn’t yet been tried mainly due to lack of speed in creating the subsystem on my part, but now that is done, hopefully, we can integrate that in as well.

For next week, I hope to have completed the following tasks.

  • Integrate both counters for different shelf and camera setups and make a decision on which counter is more accurate and has lesser latency.
  • Work on the final presentation slides prior to the presentations in the coming week.

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