Description • Architecture • Flow • Working • Installation and Setup • License
It is a DApp (Decentralized Application) coupled with Computer Vision (Convolutional Neural Network, a form of Deep Learning) to build customer trust. Computer vision ensures that the product is not damaged before or during transit. This system will contain the history of the product starting from the manufacturer and ending with the customer, all logged onto the blockchain network which is secure and transparent, avoiding the entry of counterfeit or damaged products.
9
The lifecycle of a product starts when the product is scanned and logged into the blockchain network by the manufacturer.
At every stage of the delivery, the packaged product is scanned to check if it is damaged, this is done using Computer Vision by training the model with a large number of images of various packaged goods. The product history's next stage is updated on the blockchain, only if the package is deemed not damaged after scanning, or else it is repackaged.
Hassle-free refunds and returns can be handled by scanning the product before return and comparing it with the initially scanned product before packaging, if they are deemed to be the same, the return process is initiated and the product history is continued on the blockchain network in the reverse order. This prevents manipulation or manual destruction of the product on the customer's part and helps in easy returns.
The model is trained using Tensorflow and Keras and is a Convolutional Neural Network (CNN) model comprising of 3 layers.The first layer performs the Image Extraction, the second layer performs the reduction of Image Dimensions and the final layer which is similar to an ANN(Aritificial Neural Network) and returns the final prediction. The final predicition when posted to a an API endpoint particular route returns true or false,based on the nature of the package or product(intact or damaged).
Solidity Smart Contracts have been used to assign roles, log products and change the history of the product in the entire project.
Prerequisites : yarn, git, docker(optional)
git clone https://github.com/deucaleon18/Secure-DePaRT.git
Change the directory to backend
cd blockchain
Install dependencies
yarn
To start the Hardhat local devlopment environment
yarn start
Open a second terminal to deploy the smart contracts
yarn deploy-local
Open a third terminal and enter the client folder
cd client
Install dependencies
yarn
Run the app
yarn dev
The app gets hosted by default at port 3000.
Change the directory by typing cd backend
in the terminal and then follow the steps mentioned inside the backend folder.
This project uses an MIT license.
- Documentation to help with Solidity https://docs.soliditylang.org/en/v0.8.4/
- Documentation to help with React https://reactjs.org/docs/getting-started.html
- Documentation to help with Hardhat https://hardhat.org/docs
- Documentation to help with Web3.js https://web3js.readthedocs.io/en/v1.7.4/