This file contains hidden or 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
# GoodDrag: https://github.com/zewei-Zhang/GoodDrag | |
# DragBench: https://github.com/Yujun-Shi/DragDiffusion/releases/tag/v0.1.1 | |
# Usage: python dragbench_goodrag.py [dataset_folder] | |
# Note: you should use extract_drag_bench.py first, link: https://gist.github.com/frakw/4a259ece6e8a506057ebbbddc2ad5a73 | |
# ************************************************************************* | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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
# usage: python extract_drag_bench.py [drag_bench_data_path] | |
import sys | |
import json | |
import os | |
import pickle | |
from PIL import Image | |
import numpy as np | |
This file contains hidden or 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
services: | |
region_drag: | |
stdin_open: true | |
tty: true | |
devices: | |
- /dev/dri | |
group_add: | |
- video | |
volumes: | |
- /tmp/.X11-unix:/tmp/.X11-unix |
This file contains hidden or 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
# Author : frakw | |
# Date : 2023-12-04 | |
# Description : Convert all labelme generated json into mask image in every subdirectory | |
# Usage : python labelme_gen_mask_img.py | |
import json | |
import numpy as np | |
import cv2 | |
import os | |
import fnmatch |
This file contains hidden or 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
target_type: 'aprilgrid' #gridtype | |
tagCols: 6 #number of apriltags | |
tagRows: 6 #number of apriltags | |
tagSize: 0.03 #size of apriltag, edge to edge [m] | |
tagSpacing: 0.3 #ratio of space between tags to tagSize | |
codeOffset: 0 #code offset for the first tag in the aprilboard |
This file contains hidden or 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 "imgui/imgui.h" | |
#include "imgui/imgui_impl_glfw.h" | |
#include "imgui/imgui_impl_opengl3.h" | |
#include <glad/glad.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
#include <string> | |
int main(void) | |
{ |
This file contains hidden or 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 <iostream> | |
#include <string> | |
#include <random> | |
#include <fstream> | |
#include <algorithm> | |
#include <time.h> | |
#include <chrono> | |
#include <limits> | |
#include <opencv2/opencv.hpp> | |
#define CVPLOT_HEADER_ONLY |
This file contains hidden or 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
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
using System.IO; | |
using System.Text; | |
using UnityEngine; | |
[System.Serializable] | |
public class EarthCoord | |
{ |
This file contains hidden or 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 <string> | |
#include <set> | |
#include <iostream> | |
#include <iterator> | |
using namespace std; | |
#define MAX_ARRAY_SIZE 299983//list陣列大小,用質數可以減少碰撞 | |
//參考自:https://stackoverflow.com/questions/7666509/hash-function-for-string | |
unsigned int djb2(string& word) {//hash function |
This file contains hidden or 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 <fstream> | |
#include <string> | |
#include <set> | |
#include <iostream> | |
#include <numeric> | |
#include <unordered_map> | |
#include <iterator> | |
#include <chrono> | |
#include <sstream> | |
using namespace std; |
NewerOlder