準(zhǔn)化數(shù)據(jù)集在多媒體研究中至關(guān)重要。今天,我們要給大家推薦一個匯總了姿態(tài)檢測數(shù)據(jù)集和渲染方法的 github repo。
項(xiàng)目地址:https://github.com/YoungXIAO13/ObjectPoseEstimationDatasets
這個數(shù)據(jù)集匯總了用于對象姿態(tài)估計的數(shù)據(jù)集,以及生成合成訓(xùn)練數(shù)據(jù)的呈現(xiàn)方法。在下表中,3D CAD 模型表示為模型,2D 圖像表示為對象。
該項(xiàng)目分為四個部分:
受控環(huán)境中的對象
野外物體
3D 模型數(shù)據(jù)集
渲染方法
受控環(huán)境中的對象
此表列出了通常稱為 BOP:Benchmark 6D 對象姿態(tài)估計的數(shù)據(jù)集,該數(shù)據(jù)集提供精確的 3D 對象模型和精確的 2D~3D 對齊。
可以下載所有 BOP 數(shù)據(jù)集,并使用作者提供的工具箱。
使用項(xiàng)目上面的代碼 ply2obj.py 將原始 .ply 文件轉(zhuǎn)換為 .obj 文件,并運(yùn)行 create_annotation.py 為數(shù)據(jù)集中的所有場景創(chuàng)建一個注釋文件。
以上數(shù)據(jù)集的下載地址:
HomebrewedDB:https://bop.felk.cvut.cz/datasets/
YCB-Video:https://rse-lab.cs.washington.edu/projects/posecnn/
T-LESS:https://bop.felk.cvut.cz/datasets/
Doumanoglou:https://bop.felk.cvut.cz/datasets/
Tejani:https://bop.felk.cvut.cz/datasets/
Occluded-LINEMOD:https://bop.felk.cvut.cz/datasets/
LINEMOD:https://bop.felk.cvut.cz/datasets/
野外物體
在該表中, Pix3D 和 ScanNet 提供精確的 2D-3D 對齊,而其他僅提供粗略的對齊。
PASCAL3D+ 是用于視點(diǎn)估計的事實(shí)基準(zhǔn)。
ScanNet 通常用來評估場景重建和分割。
數(shù)據(jù)集下載地址:
ApolloCar3D:http://apolloscape.auto/car_instance.html
Pix3D:http://pix3d.csail.mit.edu/
ScanNet:http://www.scan-net.org/
ObjectNet3D:http://cvgl.stanford.edu/projects/objectnet3d/
PASCAL3D+:http://cvgl.stanford.edu/projects/pascal3d.html
KITTI:http://www.cvlibs.net/datasets/kitti/eval_object.php
3D 模型數(shù)據(jù)集
為了驗(yàn)證網(wǎng)絡(luò)泛化能力,可以使用以下數(shù)據(jù)集生成合成訓(xùn)練數(shù)據(jù)。請注意,ABC 包含通用和任意的工業(yè) CAD 型,而 ShapeNetCore 和 ModelNet 包含常見類別的對象,如汽車和椅子。
數(shù)據(jù)集地址:
ABC:https://deep-geometry.github.io/abc-dataset/
ShapeNetCore:https://www.shapenet.org/download/shapenetcore
ModelNet-40:http://modelnet.cs.princeton.edu/
渲染方法
可微渲染
這里有兩篇參考論文:CVPR 2018 論文《Neural 3D Mesh Renderer》和 NIPS 2018 論文《RenderNet》。
Blender Render 渲染
本 repo 提供了相關(guān)的 python 代碼,以使用 Blender 作為一個易于安裝和生成照片級真實(shí)圖像的 python 模塊,從 3D 模型生成渲染圖像。
你可以在這里找到更多關(guān)于使用它的方法。
物理模擬器
Pybullet是機(jī)器人界非常受歡迎的一個物理模擬器。
其他
Glumpy:不支持無頭渲染(在 ssh 模式下會失敗)
UnrealCV:Unreal Engine 4 的擴(kuò)展,幫助與虛擬世界交互并與外部程序通信。
合成計算機(jī)視覺:恢復(fù)許多用于生成合成圖像的技術(shù)
via:https://github.com/YoungXIAO13/ObjectPoseEstimationDatasets
雷鋒網(wǎng)網(wǎng)雷鋒網(wǎng)雷鋒網(wǎng)
日常 Web 開發(fā)中,書寫代碼遵循的原則是用盡可能少的代碼實(shí)現(xiàn)盡可能多的功能。本文將探索日常開發(fā)中遇到的需求場景,僅用一行代碼來實(shí)現(xiàn)。
const occurrenceMap = arr => arr.reduce((acc, current) => (acc[current] = (acc[current] || 0) + 1, acc), {});
// output: { a: 2, b: 1, c: 1, d: 1 }
occurrenceMap(['a', 'b', 'c', 'a', 'd'])
const shallowClone = arr => arr.slice(0);
// or
const shallowClone = array => [...array];
// output: [ { a: 'b', b: { c: 'd' } } ]
shallowClone([{a: 'b', b: {c: 'd'}}])
由于是淺拷貝,嵌套對象或數(shù)組將通過引用拷貝,而不是復(fù)制。
const isEmptyArray = arr => Array.isArray(arr) && !arr.length;
// recommend
const isEmptyArray = ({ length }) => length === 0;
// output: true
isEmptyArray(Array(2))
({ length }) => length === 0 被大多數(shù)開發(fā)者所推薦,關(guān)于是否是數(shù)組應(yīng)該再另一個函數(shù)中判斷,遵循“函數(shù)單一職責(zé)原則”。
const removeDuplicates = arr => [...new Set(arr)];
// output: [ 'a', 'b' ]
removeDuplicates(['a', 'b', 'a'])
// output: [ { a: 1 }, 'b', { a: 1 } ],包含非原始值
removeDuplicates([{a: 1}, 'b', {a: 1}])
請注意:代碼僅適用于具有原始值(string、number、bigint、boolean、undefined、symbol 和 null)的元素。保留元素的順序并返回數(shù)組的副本。
const lowestNumber = arr => Math.min(...arr);
const biggestNumber = arr => Math.max(...arr);
// output: 1
lowestNumber([1, 2, 3, 1])
// output: 3
biggestNumber([1, 2, 3, 1])
const closestNumber = (arr, number) => arr.reduce((acc, current) => (Math.abs(current - number) < Math.abs(acc - number) ? current : acc) );
// output: 3
closestNumber([1, 2, 3, 4, 1], 3.2)
const indexOfLowestNumber = arr => arr.indexOf(Math.min(...arr));
const indexOfBiggestNumber = arr => arr.indexOf(Math.max(...arr));
// output: 0
indexOfLowestNumber([1, 2, 3, 4])
// output: 3
indexOfBiggestNumber([1, 2, 3, 4])
const splitInHalf = arr => [arr.slice(0, Math.ceil(arr.length / 2)), arr.slice(Math.ceil(arr.length / 2))];
// output: [[1, 2], [3, 4]]
splitInHalf([1,2,3,4])
const longestString = arr => arr.reduce((prev, curr) => prev.length > curr.length ? prev : curr);
const shortestString = arr => arr.reduce((prev, curr) => prev.length < curr.length ? prev : curr);
// output: abc
console.log(shortestString(['hello', 'fedlab', 'abc']));
// output: fedlab
console.log(longestString(['hello', 'fedlab', 'abc']));
此代碼還能通過返回值的 length 屬性獲取到最短、最長字符串的長度。
const sum = arr => arr.reduce((a, b) => a + b, 0);
const average = arr => arr.reduce((a, b) => a + b) / arr.length
const shuffle = arr => [...arr].sort(() => 0.5 - Math.random());
const toCamelCase = str => str.replace(/[\s\._-]+\w/g, (m) => m[m.length-1].toUpperCase());
// output: helloWorld
toCamelCase('hello-world')
toCamelCase('hello world')
toCamelCase('hello_world')
toCamelCase('hello.world')
const toPascalCase = str => str.replace(/[\s\._-]+\w/g, (m) => m[m.length - 1].toUpperCase()).replace(str.charAt(0), str.charAt(0).toUpperCase());
// output: HelloWorld
toPascalCase('hello-world')
toPascalCase('hello world')
toPascalCase('hello_world')
toPascalCase('hello.world')
const htmlSpecialChars = str => str.replace(/[&"'<>]/g, (i) => ({ "&": "&", '"': """, "'": "'", "<": "<", ">": ">" }[i]));
const reverseWords = (str) => str.replace(/(\p{L}+)/gu, (word) => [...word].reverse().join(''));
// output: olleh dlrow
reverseWords('hello world')
Unicode標(biāo)準(zhǔn)定義了每個字符的性質(zhì),許多支持Unicode的程序能夠通過\p{quality}來支持其中的一部分。
const reverseString = str => [...str].reverse().join("");
const truncateAfterWord = (str, chars, placeholder = '…') => str.length < chars ? str : `${str.substr( 0, str.substr(0, chars - placeholder.length).lastIndexOf(" "))}${placeholder}`
// output: foo bar…
truncateAfterWord('foo bar baz', 9)
520 表白可以用一下子哈。
const readline=require("readline");function genMonospacedAlphabet(e){return{" ":" ",a:"a",b:"b",c:"c",d:"d",e:"e",f:"f",g:"g",h:"h",i:"i",j:"j",k:"k",l:"l",m:"m",n:"n",o:"o",p:"p",q:"q",r:"r",s:"s",t:"t",u:"u",v:"v",w:"w",x:"x",y:"y",z:"z",A:"A",B:"B",C:"C",D:"D",E:"E",F:"F",G:"G",H:"H",I:"I",J:"J",K:"K",L:"L",M:"M",N:"N",O:"O",P:"P",Q:"Q",R:"R",S:"S",T:"T",U:"U",V:"V",W:"W",X:"X",Y:"Y",Z:"Z","!":"!","@":"@","#":"#",$:"$","%":"%","^":"^","&":"&","*":"*","(":"(",")":")",_:"_","+":"+"}[e]}const rl=readline.createInterface({input:process.stdin,output:process.stdout});rl.question("Say something: ",(e=>{rl.close();const t=e.split("").map((e=>genMonospacedAlphabet(e))).join(""),s=Math.pow,n=e=>new Promise((t=>{setTimeout((()=>{t()}),e)})),o=genMonospacedAlphabet(" "),a=(()=>{let e=-1,s=t.length;return()=>(e>s-1?e=0:e++,e===s||/\s/.test(t[e])?o:t[e])})(),r=async(e,t)=>{await process.stdout.write(((e,t,n=1,o=1)=>s(s(e*n*.05,2)+s(-t*o*.1,2)-1,3)-s(e*n*.05,2)*s(-t*o*.1,3)<0)(e,t,1.2)?"[91m"+a():o)};let i=-15;const c=async()=>{for(let e=-25;e<25;e+=1)await r(e,i),await n(2);process.stdout.write("\n"),i<10&&(i++,c())};c()}));
以上就是我們開發(fā)中經(jīng)常遇到的場景,都可以用一行代碼來實(shí)現(xiàn)。如果你還有其他的 一行代碼實(shí)現(xiàn)的逆天操作 歡迎留言討論。
先看看這哥倆的好處。讓我們一起來學(xué)習(xí)Free Pascal和Lazarus。
下面是基本步驟和資源,能夠幫助你開啟學(xué)習(xí)之旅:
program HelloWorld;
begin
writeln('Hello, World!');
end.
全文結(jié)束。下期預(yù)告:構(gòu)建一個簡單的GUI應(yīng)用程序
#編程#
*請認(rèn)真填寫需求信息,我們會在24小時內(nèi)與您取得聯(lián)系。