Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added submissions/.DS_Store
Binary file not shown.
Binary file added submissions/aarushassudani/.DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions submissions/aarushassudani/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Project Title: SynaSight

Run by running main.py. A default texture is shown, in the window with the texture press i to input your own texture. You can then type in the console a custom texture and it will show up in the texture window.

My initial idea for this was to generate a feedback map overlaid on a silhouette of a foot to visually represent the pressure sense we get on our feet when we walk on certain types of land. However this wouldn’t really nicely visualize the texture to someone looking at a 2d screen so I pivoted to creating a 3d model of the texture.

What the app does is generates a texture map based on text input from the user.

Binary file not shown.
Binary file not shown.
380 changes: 380 additions & 0 deletions submissions/aarushassudani/hf_handler.py

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions submissions/aarushassudani/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import os
os.environ['PYTORCH_MPS_HIGH_WATERMARK_RATIO'] = '0.0'
import taichi as ti
import taichi.ui as ti_ui
from hf_handler import SensationGenerator
from visualization import TextureVisualizer # Import the new class

def main():
"""
Main function for the SynaSight application with procedural textures.
"""
ti.init(arch=ti.gpu)
print("--- Welcome to SynaSight (Procedural Textures) ---")

try:
sensation_generator = SensationGenerator()
visualizer = TextureVisualizer(grid_res=(256, 256))

window = ti_ui.Window("SynaSight - Procedural Textures", res=(1280, 720), vsync=True)
canvas = window.get_canvas()
scene = window.get_scene()
camera = ti_ui.Camera()
camera.position(0, 3, 3)
camera.lookat(0, 0, 0)

except Exception as e:
print(f"\n--- FATAL ERROR DURING INITIALIZATION ---")
print(f"An error occurred: {e}")
return

# --- Initial Sensation (using default to ensure immediate GUI responsiveness) ---
initial_data = sensation_generator._get_default_sensation()
visualizer.apply_sensation(initial_data)

print("\n--- Application is running ---")
print("Describe a ground material in the console when prompted.")
print("Press ESC to exit.")

# --- Main Application Loop ---
while window.running:
if window.get_event(ti_ui.PRESS):
if window.event.key == 'i':
print("\n--------------------------------------------------")
new_input = input("Describe a material (e.g., 'soft grass', 'wet sand'): ")
print("------------------------------------------------------------------")
if new_input:
print("Generating sensation data with AI model... This may take a while.")
sensation_data = sensation_generator.generate_data(new_input)
print("AI generation complete. Applying new texture.")
visualizer.apply_sensation(sensation_data)
elif window.event.key == ti_ui.ESCAPE:
window.running = False

scene.set_camera(camera)

scene.ambient_light((0.3, 0.3, 0.3))
scene.point_light(pos=(2, 2, 2), color=(0.7, 0.7, 0.7))

visualizer.update()
visualizer.render(scene)

canvas.scene(scene)

window.show()

print("Exiting SynaSight.")

if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions submissions/aarushassudani/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
taichi
transformers
torch
accelerate
318 changes: 318 additions & 0 deletions submissions/aarushassudani/visualization.py

Large diffs are not rendered by default.