Home

Awesome

<div align="center"> <h1 align="center"> <!-- <img src="https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg" width="100" /> --> <br>allsight_sim2real</h1> <h3>Augmenting Tactile Simulators with Real-like and Zero-Shot Capabilities</h3> <p align="center"> <img src="https://img.shields.io/badge/Python-3776AB.svg?style&logo=Python&logoColor=white" alt="Python" /> <img src="https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style&logo=PyTorch&logoColor=white" alt="Pytorch" /> <img src="https://img.shields.io/badge/pandas-150458.svg?style&logo=pandas&logoColor=white" alt="pandas" /> <img src="https://img.shields.io/badge/NumPy-013243.svg?style&logo=NumPy&logoColor=white" alt="NumPy" /> <img src="https://img.shields.io/badge/opencv-%23white.svg?style&logo=opencv&logoColor=white" alt="opencv" /> </p> <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="https://opensource.org/licenses/MIT" /> <img src="https://img.shields.io/github/last-commit/RobLab-Allsight/allsight_sim2real?style&color=5D6D7E" alt="git-last-commit" /> </div>

📖 Table of Contents


📍 Overview

This repository contains the code and resources related to the paper "Augmenting Tactile Simulators with Real-like and Zero-Shot Capabilities" (under review). The paper introduces SightGAN, a cutting-edge solution for enhancing tactile perception in high-resolution tactile sensors such as allsight sensor.


:key: Key Features

Allsight Sim

The simulation data was obtained using tha allsight_sim package that utilizing TACTO a physics-engine simulator for optical-based tactile sensors.

For more information about the simulation package please see the link provided above.

SightGAN

A bi-directional Generative Adversarial Network which built upon CycleGAN and designed to bridge the reality gap between simulated and real tactile data, particularly for high-resolution tactile sensors.

<h1 align="center"> <img src="website/pic/Front.png" width="300" height="400" /> </h1>

SightGAN introduces contact-specific consistency losses:

The GAN diagram and training process can be represented as follow:

<h1 align="center"> <img src="website/pic/Scheme.png"/> </h1>

📂 Contents

This repository contains several directories with the details as follow:

<details closed><summary>Root</summary>
FileSummary
requirements.txtDependencies file
train.pyTrain the GAN model
test.pyTest the GAN model
train_regressor.pyTrain the regressor model only
train_regressor_finetune.pyTrain a pre-trained regressor model with additional data
</details> <details closed><summary>Options</summary> Python files forked from CycleGAN repo </details> <details closed><summary>Models</summary>
FileSummary
diff_cycle_gan_model.pyThe class of SightGAN model with its auxilliary losses

All the rest of the files were forked from CycleGAN and helps for building and managing the models during training and test procedures.

</details> <details closed><summary>Data_process</summary>
FileSummary
merge_json_sim.pyMerging all the dataset from simulation into main json file database
sim2gan_json.pyUpdata the json file with generated image pathes
filter_real_images.pyFiltering the real data and creating a json file database
transfer_images.pyTransfering iamges from sim and real databases to the train/test folders
add_diff_frame.pyupdate the json file with the substracted images
</details> <details closed><summary>Train_allsight_regressor</summary>

A Python package for training the spatial contact estimator and inherit the models.

</details> <details closed><summary>Util</summary>

Python files forked from CycleGAN repo

</details>

🚀 Getting Started

Dependencies

Please ensure you have the following dependencies installed on your system.

Project was tested on:

🔧 Installation

  1. Clone the allsight_sim2real repository:
git clone https://github.com/RobLab-Allsight/allsight_sim2real
  1. Change to the project directory:
cd allsight_sim2real
  1. Install the dependencies:
pip install -r requirements.txt

🤖 Running allsight_sim2real

NOTE: Be aware for the pathes adjusts and adaptation for your custom dataset.

NOTE: Please Be aware for the arguments adjusts needed for every script.

Assuming you have a dataset folder and updated package with the relevant pathes to your dataset:

Filter the real data:

python3 data_process/filter_real_images.py 

Merge sim data:

python3 data_process/merge_json_sim.py 

Add diff frame:

python3 data_process/add_diff_frame.py

Transfer images to gan folders:

python3 data_process/transfer_images.py 

Train CycleGAN:

python3 train.py <arguments> 

📄 License

This repository is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of this license.


👏 Acknowledgments


:clipboard: BibTeX

@misc{azulay2023augmenting,
      title={Augmenting Tactile Simulators with Real-like and Zero-Shot Capabilities}, 
      author={Osher Azulay and Alon Mizrahi and Nimrod Curtis and Avishai Sintov},
      year={2023},
      eprint={2309.10409},
      archivePrefix={arXiv},
      primaryClass={cs.RO}
}

↑ Return