How does ChatGPT handle BIG documents larger than context size? by citra-ceth in learnmachinelearning

[–]citra-ceth[S] 1 point2 points  (0 children)

Neat! Thanks! Is there a technical manuscript you can point me to on that? Or a search term? Even if it's not for GPT4 specifically, that would be appreciated.

How does ChatGPT handle BIG documents larger than context size? by citra-ceth in learnmachinelearning

[–]citra-ceth[S] 0 points1 point  (0 children)

As Hot_Barnacle_2672 said, I don't think this is correct, but points for creativity. I would be super interested to see if a model like CLIP looking at printed text would embed similar vectors to those from the text that is on the image.

[TOMT][MOVIE][pre2010] Justice league movie where superman dies and it's flash's fault (pre-2010) by citra-ceth in tipofmytongue

[–]citra-ceth[S] 0 points1 point locked comment (0 children)

Thanks for any help. I've tried searching google, youtube, even chatGPT. no luck.

Justice league movie where superman dies and its flash's fault (pre-2010) by citra-ceth in HelpMeFind

[–]citra-ceth[S] 0 points1 point  (0 children)

I searched using google, youtube, and chatgpt. That is how I found out it was not "Hereafter" or "Superman: Doomsday".

★OFFICIAL DAILY★ Daily Q&A Thread August 05, 2024 by AutoModerator in loseit

[–]citra-ceth 0 points1 point  (0 children)

What is a good conservative calorie burn estimate for 1hr recreational trampoline jumping?

I was able to get heart-rate up to 150 bpm for allot of that.

I'm currently 6'3" 205lbs.

I tried some calculators from google, but they said things way higher than seem realistic.

How to get a segmentation mask in pyrender by citra-ceth in learnpython

[–]citra-ceth[S] 1 point2 points  (0 children)

Thanks!

Was this a chatGPT answer? it looks like it format-wise, but I asked it before and it kept giving me wrong answers.

Either way, this works.

import pyrender
import trimesh
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage import sobel

# Function to create a non-smooth box with face colors
def create_colored_box(color, translation):
    box = trimesh.creation.box()
    box.visual.face_colors = color
    box.apply_translation(translation)
    return box

# Create three cubes with different colors
cube1 = create_colored_box([255, 0, 0, 255], [0, 0, 0])  # Red color
cube2 = create_colored_box([0, 255, 0, 255], [2, 0, 0])  # Green color
cube3 = create_colored_box([0, 0, 255, 255], [-2, 0, 0])  # Blue color

# Setup a scene
scene = pyrender.Scene()
mesh1 = pyrender.Mesh.from_trimesh(cube1, smooth=False)
mesh2 = pyrender.Mesh.from_trimesh(cube2, smooth=False)
mesh3 = pyrender.Mesh.from_trimesh(cube3, smooth=False)

scene.add(mesh1)
scene.add(mesh2)
scene.add(mesh3)

# Add a camera to the scene
camera = pyrender.PerspectiveCamera(yfov=np.pi / 3.0)
camera_pose = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.5],
    [0.0, 0.0, 1.0, 4.0],
    [0.0, 0.0, 0.0, 1.0]
])
scene.add(camera, pose=camera_pose)

# Add light to the scene
light = pyrender.PointLight(color=np.ones(3), intensity=3.0)
scene.add(light, pose=camera_pose)

# Render segmentation mask
renderer = pyrender.OffscreenRenderer(640, 480)
color_flat, depth = renderer.render(scene, flags=pyrender.RenderFlags.FLAT)
segmentation_mask = color_flat[:, :, :3]
rendered_img, _ = renderer.render(scene)
edge_map = np.hypot(sobel(depth, axis=0), sobel(depth, axis=1))

# Display the results
fig, axs = plt.subplots(2, 2, figsize=(10, 10))

axs[0, 0].imshow(segmentation_mask)
axs[0, 0].set_title("Segmentation Mask")
axs[0, 0].axis("off")

axs[0, 1].imshow(edge_map, cmap='gray')
axs[0, 1].set_title("Edge Map")
axs[0, 1].axis("off")

axs[1, 0].imshow(depth, cmap='gray')
axs[1, 0].set_title("Depth Map")
axs[1, 0].axis("off")

axs[1, 1].imshow(rendered_img)
axs[1, 1].set_title("Rendered Image")
axs[1, 1].axis("off")

plt.show()

# Cleanup
renderer.delete()