首页 > 其他分享 >每个模型变体都旨在提供平均精度 (mAP)

每个模型变体都旨在提供平均精度 (mAP)

时间:2024-08-19 13:38:05浏览次数:8  
标签:mAP const 变体 THREE laipuhuo child new com 精度

matplotlib>=3.2.2
numpy>=1.18.5
opencv-python>=4.6.0
Pillow>=7.1.2
PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.4.1
torch>=1.7.0
torchvision>=0.8.1
tqdm>=4.64.0
tensorboard>=2.4.1
pandas>=1.1.4
seaborn>=0.11.0
from ultralytics import YOLO

def val():

# Create a YOLO-World model
model = YOLO("yolov8s-world.pt")  # or select yolov8m/l-world.pt for different sizes

# Conduct model validation on the COCO8 example dataset  www.laipuhuo.com
metrics = model.val(data="coco8.yaml", batch=1, imgsz=640, device=0,workers=1)

if name=="main":
val()

three.js webgpu - skinning instancing three.js webgpu - skinning instancing
                    // this.syncOnes(3, 2);
                    // this.syncOnes(2, 1);
                    // this.syncOnes(1);
                    this.time = 0;

                    // const params = {opacity:1};
                    // new TWEEN.Tween(params)
                    //     .to({ opacity: 0 }, this.delay * 1000)
                    //     .onUpdate(function () {
                    //         // console.log(params.opacity)
                    //         window.setInstanceOpacity && window.setInstanceOpacity(1,params.opacity)
                    //         window.setInstanceOpacity && window.setInstanceOpacity(2,params.opacity)
                    //     })
                    //     .start();
                }
            }

                // scene.add(cameraLight);

                const rectLight1 = new THREE.RectAreaLight(0xffffff, 10, 100, 0.5);
                rectLight1.position.set(0, 2, 0);
                rectLight1.lookAt(0, -1, 0);
                scene.add(rectLight1);
                {
                    const rectLight1 = new THREE.RectAreaLight(0xffffff, 1, 10, 0.5);
                    rectLight1.position.set(0, 2.1, 0);
                    rectLight1.lookAt(0, -1, 0);
                    scene.add(rectLight1);
                }
                {
                    const rectLight1 = new THREE.RectAreaLight(0xffffff, 10, 10, 0.1);
                    rectLight1.position.set(0, 0, 2);
                    rectLight1.lookAt(0, 0, 0);
                    scene.add(rectLight1);
                }


                        // 提供uniform
                        // 选中的实例索引
                        // child.selectInstanceIndex = ttI;
                        // child.selectInstanceIndex = indexNode;
                        child.selectInstanceIndex = uniform(-1, "float");

                        // 选中的实例索引的透明度
                        child.selectInstanceIndexOpacity = tt;
                        // child.selectInstanceIndexOpacity = uniform(0.5, "float");

                        // child.selectInstanceIndexOpacity = abs(oscSine(timerLocal(0.33334)));
                        // child.selectInstanceIndexOpacity = oscNode
                        child.count = instanceCount;
                        //重新设置 实例矩阵长度 为原长度的instanceCount倍
                        child.skeleton.setInstanceCount(instanceCount);

                        // gui.add(
                        //     {
                        //         f: () => {
                        //             mixer.update(delta);
                        //             console.log(child.skeleton.boneMatrices);
                        //         },
                        //     },
                        //     "f"
                        // ).name("mixer.update()");

                        for (let i = 0; i < instanceCount; i++) {
                            // dummy.position.y = Math.floor(i / 5) * -200;
                            dummy.position.x = 70;
                            // dummy.position.x = i * 70;
                            dummy.position.z = i * -0.1;

                            dummy.updateMatrix();

                            dummy.matrix.toArray(child.instanceMatrix.array, i * 16);

                            floatIndex[i] = i;

                            floatOpacity[i] = 1;
                        }

                        const setIndexFadeOut = i => {
                            // child.selectInstanceIndex.value = i;
                            // dir = -1;
                            // tt.value = 1;
                        };

    
                        // gui.add({ f: () => skinningInstanceMatrices.syncIndex(4) }, "f").name("4 ASYNC");
                        // gui.add({ f: () => skinningInstanceMatrices.syncIndex(5) }, "f").name("5 ASYNC");
                        // gui.add({ f: () => skinningInstanceMatrices.syncIndex(6) }, "f").name("6 ASYNC");
                        // gui.add({ f: () => skinningInstanceMatrices.syncIndex(7) }, "f").name("7 ASYNC");
                        // gui.add({ f: () => skinningInstanceMatrices.syncIndex(8) }, "f").name("8 ASYNC");
                        // gui.add({ f: () => skinningInstanceMatrices.syncIndex(9) }, "f").name("9 ASYNC");
                    }
                });

                scene.add(object);
            });

            loader.load("./avoid.glb", function (gltf) {
                const object = gltf.scene;
                const avoidGUI = gui.addFolder("躲避");

                mixer2 = new THREE.AnimationMixer(object);

                const action = mixer2.clipAction(gltf.animations[0]);
                // 播放一次
                // action.loop = THREE.LoopOnce;
                // 播完保持当前姿势
                action.clampWhenFinished = true;
                action.play();

                // mixer2.addEventListener("finished", c => {
                //     skinningInstanceMatrices2 && skinningInstanceMatrices2.finished();
                // });

                const instanceCount = 10;
                const dummy = new THREE.Object3D();

                object.traverse(child => {
                    if (child.isMesh) {
                        skinningInstanceMatrices2 = new SkinningInstanceMatrices(child);
                        skinningInstanceMatrices2.start();

                        const oscNode = abs(oscSine(timerLocal(0.1)));
                        const indexNode = floor(oscNode.div(0.3333334));

                        const randomColors = range(new THREE.Color(0x000000), new THREE.Color(0xffffff));

                        const randomMetalness = range(0, 1);www.laipuhuo.com
                        const prevMap = child.material.map;

                        // 设置 false 不计入 视椎体可见范围计算 避免被隐藏  椎体计算 一般使用object.boundingSphere
                        child.frustumCulled = false;

                        // 显示卡通边框
                        child.CartoonBorder = true;
                        child.cartoonBorder = uniform(0.2);
                        child.cartoonBorderColor = uniform(new THREE.Color("#ffffff"));
                        child.CartoonBorderLight = uniform(vec3(0, 0, 1), "vec3");

                        avoidGUI.add(child.cartoonBorder, "value", 0, 1).name("cartoonBorder");
                        avoidGUI.add(skinningInstanceMatrices2, "delay", 0, 0.2).name("speed");

                        avoidGUI
                            .addColor({ color: "#" + child.cartoonBorderColor.value.getHexString() }, "color")
                            .onChange(c => {
                                const newColor = new THREE.Color(c);
                                child.cartoonBorderColor.value.copy(newColor);
                            });
                        // 重新播放
                        avoidGUI
                            .add(
                                {
                                    f: () => {
                                        action.reset();
                                        skinningInstanceMatrices2.start();
                                    },
                                },
                                "f"
                            )
                            .name("Reset Action");

                        child.material = new THREE.MeshStandardNodeMaterial({
                            transparent: true,
                            side: 0,
                        });

                        child.material.colorNode = texture(prevMap);
                        // child.material.colorNode = mix(texture(prevMap), randomColors, oscNode);

                        child.isInstancedMesh = true;

                        child.instanceMatrix = new THREE.InstancedBufferAttribute(
                            new Float32Array(instanceCount * 16),
                            16
                        );

                        // 透明度
                        const floatOpacity = new Float32Array(instanceCount);

                        const buffer = new THREE.InstancedBufferAttribute(floatOpacity, 1);

                        child.instanceOpacity = instancedBufferAttribute(buffer);

                        child.hideOther = child.setOmitOneOpacity = (op = 0) => {
                            floatOpacity.fill(op);
                            floatOpacity[0] = 1;www.laipuhuo.com
                            buffer.needsUpdate = true;
                        };

                        child.showOther = () => {
                            floatOpacity.fill(1);
                            buffer.needsUpdate = true;
                        };

                        const floatIndex = new Float32Array(instanceCount);

                        const indexBuffer = new THREE.InstancedBufferAttribute(floatIndex, 1);
                        child.instanceIndex = instancedBufferAttribute(indexBuffer);

                        child.selectInstanceIndex = uniform(-1, "float");

                        // 选中的实例索引的透明度
                        child.selectInstanceIndexOpacity = tt;

                        child.count = instanceCount;
                        //重新设置 实例矩阵长度 为原长度的instanceCount倍
                        child.skeleton.setInstanceCount(instanceCount);

                        for (let i = 0; i < instanceCount; i++) {
                            // dummy.position.y = Math.floor(i / 5) * -200;
                            dummy.position.x = -70;
                            // dummy.position.x = i * 70;
                            // dummy.position.y = i * -2;

                            dummy.updateMatrix();

                            dummy.matrix.toArray(child.instanceMatrix.array, i * 16);

                            floatIndex[i] = i;

                            floatOpacity[i] = 1;
                        }
                    }
                });

                scene.add(object);
            });

            loader.load("./AirEvasion.glb", function (gltf) {
                const object = gltf.scene;
                const AirEvasionGUI = gui.addFolder("空中躲避");

                mixer3 = new THREE.AnimationMixer(object);

                const action = mixer3.clipAction(gltf.animations[0]);
                // 播放一次
                action.loop = THREE.LoopOnce;
                // 播完保持当前姿势
                action.clampWhenFinished = true;
                action.play();

                mixer3.addEventListener("finished", c => {
                    skinningInstanceMatrices3 && skinningInstanceMatrices3.finished();
                });

                const instanceCount = 10;
                const dummy = new THREE.Object3D();

                object.traverse(child => {
                    if (child.isMesh) {www.laipuhuo.com
                        skinningInstanceMatrices3 = new SkinningInstanceMatrices(child, 2, 29, true);
                        skinningInstanceMatrices3.start();

                        const oscNode = abs(oscSine(timerLocal(0.1)));
                        const indexNode = floor(oscNode.div(0.3333334));

                        const randomColors = range(new THREE.Color(0x000000), new THREE.Color(0xffffff));

                        const randomMetalness = range(0, 1);
                        const prevMap = child.material.map;

                        // 设置 false 不计入 视椎体可见范围计算 避免被隐藏  椎体计算 一般使用object.boundingSphere
                        child.frustumCulled = false;

                        // 显示卡通边框
                        child.CartoonBorder = true;
                        child.cartoonBorder = uniform(0.2);
                        child.cartoonBorderColor = uniform(new THREE.Color("#ffffff"));
                        child.CartoonBorderLight = uniform(vec3(0, 0, 1), "vec3");

                        AirEvasionGUI.add(child.cartoonBorder, "value", 0, 1).name("cartoonBorder");
                        AirEvasionGUI.add(skinningInstanceMatrices3, "delay", 0, 0.5).name("speed");

                        AirEvasionGUI.addColor(
                            { color: "#" + child.cartoonBorderColor.value.getHexString() },
                            "color"
                        ).onChange(c => {
                            const newColor = new THREE.Color(c);
                            child.cartoonBorderColor.value.copy(newColor);
                        });
                        // 重新播放
                        AirEvasionGUI.add(
                            {
                                f: (www.laipuhuo.com) => {
                                    action.reset();
                                    skinningInstanceMatrices3.start();
                                },
                            },
                            "f"
                        ).name("Reset Action");

                        child.material = new THREE.MeshStandardNodeMaterial({
                            transparent: true,
                            side: 0,
                        });

                        child.material.colorNode = texture(prevMap);
                        // child.material.colorNode = mix(texture(prevMap), randomColors, oscNode);

                        child.isInstancedMesh = true;

                        child.instanceMatrix = new THREE.InstancedBufferAttribute(
                            new Float32Array(instanceCount * 16),
                            16
                        );

                        // 透明度
                        const floatOpacity = new Float32Array(instanceCount);

                        const buffer = new THREE.InstancedBufferAttribute(floatOpacity, 1);

                        child.instanceOpacity = instancedBufferAttribute(buffer);

                        child.hideOther = child.setOmitOneOpacity = (op = 0) => {
                            floatOpacity.fill(op);
                            floatOpacity[0] = 1;
                            buffer.needsUpdate = true;
                        };www.laipuhuo.com

                        child.setOpacity = (index, op = 0) => {
                            floatOpacity[index] = op;
                            buffer.needsUpdate = true;
                        };

                        child.showOther = () => {
                            floatOpacity.fill(1);
                            buffer.needsUpdate = true;
                        };

                        const floatIndex = new Float32Array(instanceCount);

                        const indexBuffer = new THREE.InstancedBufferAttribute(floatIndex, 1);
                        child.instanceIndex = instancedBufferAttribute(indexBuffer);

                        child.selectInstanceIndex = uniform(-1, "float");

                        // 选中的实例索引的透明度
                        child.selectInstanceIndexOpacity = tt;

                        child.count = instanceCount;
                        //重新设置 实例矩阵长度 为原长度的instanceCount倍
                        child.skeleton.setInstanceCount(instanceCount);

                        for (let i = 0; i < instanceCount; i++) {
                            // dummy.position.y = Math.floor(i / 5) * -200;
                            dummy.position.x = -140;
                            // dummy.position.x = i * 70;
                            // dummy.position.y = i * -2;
                            dummy.position.y = 60;

                            dummy.updateMatrix();

                            dummy.matrix.toArray(child.instanceMatrix.array, i * 16);

                            floatIndex[i] = i;

                            www.laipuhuo.com floatOpacity[i] = 1;
                        }
                    }
                });

                scene.add(object);
            });

            // renderer

            renderer = new THREE.WebGPURenderer({ antialias: true });
            renderer.setPixelRatio(2);
            renderer.setSize(window.innerWidth, window.innerHeight);
            renderer.setAnimationLoop(animate);
            document.body.appendChild(renderer.domElement);

            controls = new OrbitControls(camera, renderer.domElement);

            controls.target.set(0, 1, 0);
            controls.object.position.set(0, 1, 4);

            // post processing www.laipuhuo.com

            const scenePass = pass(scene, camera);
            const scenePassColor = scenePass.getTextureNode();
            const scenePassDepth = scenePass.getLinearDepthNode().remapClamp(0.15, 0.3);

            const scenePassColorBlurred = scenePassColor.gaussianBlur();
            scenePassColorBlurred.directionNode = scenePassDepth;

            // postProcessing = new THREE.PostProcessing(renderer);
            // postProcessing.outputNode = scenePassColorBlurred;

            // events

            window.addEventListener("resize", onWindowResize);
        }

        function onWindowResize(laipuhuo.com) {
            camera.aspect = window.innerWidth / window.innerHeight;
            camera.updateProjectionMatrix();

            renderer.setSize(window.innerWidth, window.innerHeight);
        }

        function animate() {
            delta = clock.getDelta();

            if (skinningInstanceMatrices) {
                TWEEN.update();
            }
            if (!window.stopAnimation) {laipuhuo.com
                skinningInstanceMatrices && skinningInstanceMatrices.prevAction(delta);
                if (mixer) mixer.update(delta);
                skinningInstanceMatrices2 && skinningInstanceMatrices2.prevAction(delta);
                if (mixer2) mixer2.update(delta);
                skinningInstanceMatrices3 && skinningInstanceMatrices3.prevAction(delta);
                if (mixer3) mixer3.update(delta);
            }

https://www.laipuhuo.com/goodsDetail/0145c6c01d184cea8e0be6062f1b86e8.html
https://www.laipuhuo.com/goodsDetail/013e9ffdf507465880072a88b4d6f0ee.html
https://www.laipuhuo.com/goodsDetail/013e83953be149e087b57f596cbaf5d2.html
https://www.laipuhuo.com/goodsDetail/013DA7DD55FF4D24A6967F5CF115341F.html
https://www.laipuhuo.com/goodsDetail/01359a2c816244efb43031ce2b52c550.html
https://www.laipuhuo.com/goodsDetail/0132549b55ce4580b04bcb815853ac14.html
https://www.laipuhuo.com/goodsDetail/013161be1f284a0f9da4fc982408ae5d.html
https://www.laipuhuo.com/goodsDetail/012E0B535C5F4122B495DD908084FA23.html
https://www.laipuhuo.com/goodsDetail/012bc510f3cf49f8b2aeeb491d02f99c.html
https://www.laipuhuo.com/goodsDetail/0129aac78ff34b0abe823c1dbcade9a6.html
https://www.laipuhuo.com/goodsDetail/01261bfaae044eed89707d7bd93498c9.html

标签:mAP,const,变体,THREE,laipuhuo,child,new,com,精度
From: https://www.cnblogs.com/wwwlaipuhuocom/p/18367141

相关文章

  • 北斗/GNSS高精度数据处理暨GAMIT/GLOBK v10.75软件
    随着GNSS导航定位技术在不同领域的广泛应用和技术更新的飞速发展,在大型工程项目的设计、施工、运行和管理各个阶段对工程测量提出了更高的要求,许多测绘、勘测、规划、市政、交通、铁道、水利水电、建筑、矿山、道桥、国土资源、气象、地震等行业部门在大型工程建设过程中需应用......
  • JavaScript ES6 Map
    Map对象保存键值对。任何值(对象或者原始值)都可以作为一个键或一个值。Maps和Objects的区别一个Object的键只能是字符串或者Symbols,但一个Map的键可以是任意值。Map中的键值是有序的(FIFO原则),而添加到对象中的键则不是。Map的键值对个数可以从size属性获......
  • .map文件的作用
    链接器生成的.map文件是一种文本文件,用于描述程序的源代码与目标代码之间的映射关系。它可以帮助开发人员在程序出现问题时,定位问题所在的源代码位置,从而进行调试和修复。.map文件中包含了每个源代码文件的名称、源代码中的函数和变量在目标代码中的地址映射关系等信息。链接器是......
  • 【Head3D X 2024 三维RGB - 头部三维数据集-RGB-高精度-三维建模渲染-高清】
    Head3DX2024商用数据集一、数据标注信息(数据量20w+)1)高清原图(短边高于等于2000像素)2)三维头部mesh(obj文件)3)三维虚拟相机内参(npy文件)4)二维头部关键点信息(npy文件5)姿态角(pitch,roll,yaw)检测(基于相机坐标系)三维维建模渲染示例:(Head3D2024三维渲染......
  • 半精度、单精度和双精度浮点数的表示
    浮点数表示概述浮点数有三种精度,不同的精度的存储位数,数值范围,精度,内存消耗和性能上有所不同精度越大精度越小存储位数↑↓数值范围↑↓精度↑↓内存消耗↑↓性能↓↑半精度浮点数一个双精度浮点数占2个字节(16位)位域位数符号1......
  • 高精度加减乘
    #include<bits/stdc++.h>usingnamespacestd;typedeflonglongll;inta[10088],b[10087],c[10087];stringmem("0123456789ABCDEF");boolcheck_(stringa,stringb){ if(a.length()>b.length())return1; if(b.length()>a.length())return0......
  • 高精度减法与混合加法
    高精度减法bigNumbigSub(bigNum*a,bigNum*b){ bigNumc; for(inti=0;i<a->len||i<b->len;i++) { if(a->num[i]<b->num[i]) { a->num[i]+=10; a->num[i+1]-=1; } c.num[i]=a->num[i]-b->num[i];......
  • 【漫谈C语言和嵌入式007】AD2S1210简介与应用:高精度旋转变压器到数字转换器的解析
            在精密运动控制和测量系统中,旋转变压器(Resolver)是一种常用的传感器,能够精确检测旋转轴的位置和速度。为了将旋转变压器的模拟信号转换为数字信号,便于微控制器或DSP进行处理,AD2S1210作为一款高性能的旋转变压器到数字转换器(RDC),为工程师提供了高精度、低延迟的......
  • NP2011-SW-22-VLAN跳跃攻击_VACL(VLAN-MAP)
    vlan跳跃攻击打双层标记配置端口为access端口trunk模式最好是on关闭trunknegotiation本证vlan使用不用的vlan号配置trunk链路要设置允许哪些vlan通过交换机的aclipaclmacaclvlanacl配置access-list100permitip10.1.9.00.0.0.255anymacaccess-listextende......
  • C#:Bitmap类使用方法—第1讲
    首先看一下Bitmap定义:封装GDI+位图,此位图由图形图像及其属性的像素数据组成。 Bitmap 是用于处理由像素数据定义的图像的对象。下面介绍一下使用的例子:Bitmapimage1;privatevoidButton1_Click(System.Objectsender,System.EventArgse){  try  {  ......