This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[03/11 17:29:45 detectron2]: Rank of current process: 0. World size: 2 | |
[03/11 17:29:46 detectron2]: Environment info: | |
------------------------------- ----------------------------------------------------------------------------------------------------------------------- | |
sys.platform linux | |
Python 3.11.4 (main, Jul 5 2023, 13:45:01) [GCC 11.2.0] | |
numpy 1.26.4 | |
detectron2 0.6 @~/ViTMatte/detectron2/detectron2 | |
Compiler GCC 12.2 | |
CUDA compiler CUDA 11.8 | |
detectron2 arch flags ~/ViTMatte/detectron2/detectron2/_C.cpython-311-x86_64-linux-gnu.so; cannot find cuobjdump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build on linux: | |
// sudo apt install freeglut3-dev | |
// gcc main.c -o main -lGL -lglut | |
#include <GL/glut.h> | |
void drawVertices(GLenum mode, const void *vertices, int n_vertices){ | |
glEnableClientState(GL_VERTEX_ARRAY); | |
glVertexPointer(2, GL_FLOAT, 0, vertices); | |
glDrawArrays(mode, 0, n_vertices); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
int *val; /* item values */ | |
int ncmp; /* number of comparisons */ | |
int nsolid; /* number of solid items */ | |
int candidate; /* pivot candidate */ | |
int gas; /* gas value */ | |
#define freeze(x) val[x] = nsolid++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
int *val; /* item values */ | |
int ncmp; /* number of comparisons */ | |
int nsolid; /* number of solid items */ | |
int candidate; /* pivot candidate */ | |
int gas; /* gas value */ | |
#define freeze(x) val[x] = nsolid++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// because http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl is often down | |
vec3 rgb2hsv(vec3 c) | |
{ | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); | |
float d = q.x - min(q.w, q.y); | |
float e = 1.0e-10; |