Skip to content

openCV (YOLO) application that indentifies and notifies users when a perishable is about to expire in a fridge

License

Notifications You must be signed in to change notification settings

LordFarquaadtheCreator/veggieGuard

Repository files navigation

veggieGuard

Computer vision application that indentifies new items in a fridge and notifies users when a perishable is about to expire

Inspiration

Our teammates are all college students who are always busy with school and work. We often forgot what we had in our fridge and bought food we already had. It is not only bad for our wallets but also for the environment. Wasted food in the US alone produces 170 million metric tons of co2 per year.

Output

The application returns the fruits classified and confidence percentage.

Download YOLO (via Darknet)

git clone https://github.com/pjreddie/darknet
cd darknet
make
  • wget https://pjreddie.com/media/files/yolov3.weights
  • this will download test data, which can be tested via the darknet/data folder
  • to run a test of it (from the darknet folder) you can run ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg

Optional: Future Goals for LIVE Computer Vision

  • cd $home
  • mkdir OpenCV
  • cd OpenCV
  • git clone https://github.com/opencv/opencv.git
  • git clone https://github.com/opencv/opencv_contrib.git
  • mkdir build_opencv
  • cd build_opencv
  • cmake -DCMAKE_BUILD_TYPE=Release -D OPENCV_GENERATE_PKGCONFIG=ON -DBUILD_EXAMPLES=ON -D CMAKE_INSTALL_PREFIX=/usr/local ../opencv
    • you will need cmake downloaded for this
    • brew install cmake
  • make -j7
  • sudo make install
  • pkg-config --cflags opencv4

Try to compile darknet again

if you encounter the error where it still can’t find opencv.pc, you might want to check that you have the opencv4.pc in the following location ls /usr/local/lib/pkgconfig/opencv4.pc

  • if you do then just copy opencv4 to opencv by using the following command sudo cp /usr/local/lib/pkgconfig/opencv4.pc /usr/local/lib/pkgconfig/opencv.pc

Now try to compile darknet again but first you will need to change the option opencv=1 in the Makefile. When you try to run the make command you might get the following error if you are using opencv version 4. error: #error "OpenCV 4.x+ requires enabled C++11 support"

To solve this you will need to edit the Makefile by adding the -std=c++11 in the following line: CPP=g++ -std=c++11

About

openCV (YOLO) application that indentifies and notifies users when a perishable is about to expire in a fridge

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •