/congenial-system

GNU General Public License v3.0GPL-3.0

Status:


Logo

Virtual TryOn

AR application for virtual try on of sneakers
View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

The state of the art in machine learning (ML) has achieved exceptional accuracy on many computer vision tasks solely by training models on photos. Building upon these successes and advancing 3D object understanding has great potential to power a wider range of applications, such as augmented reality, robotics, autonomy, and image retrieval.

Source

Here we are presenting to develop an AR application which overlays a 3D object on the existing shoes.

Solution

Demo

TEMPLATE DEVELOPMENT

Some 3D models can be used from here

https://app.gazebosim.org/dashboard

Once downloaded, they can be transform as shown below.

Source

First run

./mediapipe/graphs/object_detection_3d/obj_parser/obj_cleanup.sh [INPUT_DIR] [INTERMEDIATE_OUTPUT_DIR]

and then run

bazel run -c opt mediapipe/graphs/object_detection_3d/obj_parser:ObjParser -- input_dir=[INTERMEDIATE_OUTPUT_DIR] output_dir=[OUTPUT_DIR]

INPUT_DIR should be the folder with initial asset .obj files to be processed, and OUTPUT_DIR is the folder where the processed asset .uuu file will be placed.

Note: ObjParser combines all .obj files found in the given directory into a single .uuu animation file, using the order given by sorting the filenames alphanumerically. Also the ObjParser directory inputs must be given as absolute paths, not relative paths. See parser utility library at mediapipe/graphs/object_detection_3d/obj_parser/ for more details.

DEPLOYMENT

Demo1 Demo2

Image2.png Image3.png

Built With

  • mediapipe
  • Android

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • mediapipe

Installation

  1. Clone the repo

    git clone https://github.com/Princep/congenial-system.git
    git submodules update
    cd mediapipe
  2. Use mediapipe

  • Replace the textures and models
#Update the model_scale and model_transformation
model_scale: [0.45, 0.55, 0.15]
model_transformation: [1.0, 0.0, 0.0, 0.0]
model_transformation: [1.0, 0.0, 1.0, -0.9]
model_transformation: [0.0, 0.0, 0.0, 1.0]

#Animation file
cp mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d/assets/sneaker/model.obj.uuu mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d/assets/box.obj.uuu

#Texture file
cp mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d/assets/sneaker/texture.jpg mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d/assets/texture.jpg
  • Prerequistes
cd mediapipe
#Add Android workspace in WORKSPACE file
android_sdk_repository(name = "androidsdk", build_tools_version = "30.0.2")
android_ndk_repository(name = "androidndk", api_level =	20)


# Switch to OpenCV 4
sed -i -e 's:3.4.3/opencv-3.4.3:4.0.1/opencv-4.0.1:g' WORKSPACE
sed -i -e 's:libopencv_java3:libopencv_java4:g' third_party/opencv_android.BUILD
  • Build and install app
    bazel build -c opt --config android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d:objectdetection3d

    adb install -r bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetection3d/objectdetection3d.apk
  • Run the app

Usage

  • Download the apk provided in Source code Archive.zip. Allow Permissions to install the apk. Source
  • Point it directly on your feets. NOTE : Make sure the feets have some existing shoes or sandals.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Your Name - @pp_spector - prince.patel.14@gmail.com

Project Link: https://github.com/PrinceP/congenial-system.git

Acknowledgements