【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matchingharmonylab
公開URL:https://arxiv.org/pdf/2404.19174
出典:Guilherme Potje, Felipe Cadar, Andre Araujo, Renato Martins, Erickson R. ascimento: XFeat: Accelerated Features for Lightweight Image Matching, Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2023)
概要:リソース効率に優れた特徴点マッチングのための軽量なアーキテクチャ「XFeat(Accelerated Features)」を提案します。手法は、局所的な特徴点の検出、抽出、マッチングのための畳み込みニューラルネットワークの基本的な設計を再検討します。特に、リソースが限られたデバイス向けに迅速かつ堅牢なアルゴリズムが必要とされるため、解像度を可能な限り高く保ちながら、ネットワークのチャネル数を制限します。さらに、スパース下でのマッチングを選択できる設計となっており、ナビゲーションやARなどのアプリケーションに適しています。XFeatは、高速かつ同等以上の精度を実現し、一般的なラップトップのCPU上でリアルタイムで動作します。
セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 3 体以上の物体の組み立てが挙げられる.一般に,複数物体を同時に組み立てる際は,対象の部品をそれぞれロボットアームまたは治具でそれぞれ独立に保持することで組み立てを遂行すると考えられる.ただし,この方法ではロボットアームや治具を部品数と同じ数だけ必要とし,部品数が多いほどコスト面や設置スペースの関係で無駄が多くなる.この課題に対して音𣷓らは組み立て対象物に働く接触力等の解析により,治具等で固定されていない対象物が組み立て作業中に運動しにくい状態となる条件を求めた.すなわち,環境中の非把持対象物のロバスト性を考慮して,組み立て作業条件を検討している.本研究ではこの方策に基づいて,複数物体の組み立て作業を単腕マニピュレータで実行することを目的とする.このとき,対象物のロバスト性を考慮することで,仮組状態の複数物体を同時に扱う手法を提案する.作業対象としてパイプジョイントの組み立てを挙げ,簡易な道具を用いることで単腕マニピュレータで複数物体を同時に把持できることを示す.さらに,作業成功率の向上のために RGB-D カメラを用いた物体の位置検出に基づくロボット制御及び動作計画を実装する.
This paper discusses assembly operations using a single manipulator and a parallel gripper to simultaneously
grasp multiple objects and hold the group of temporarily assembled objects. Multiple robots and jigs generally operate
assembly tasks by constraining the target objects mechanically or geometrically to prevent them from moving. It is
necessary to analyze the physical interaction between the objects for such constraints to achieve the tasks with a single
gripper. In this paper, we focus on assembling pipe joints as an example and discuss constraining the motion of the
objects. Our demonstration shows that a simple tool can facilitate holding multiple objects with a single gripper.
22. 3. Kubernetesにおけるポリシー制御
deprecate PSP in 1.21, but leave removal at 1.25 #97171
https://github.com/kubernetes/kubernetes/pull/97171
なぜ Pod Security Policy (PSP) は Kubernetes 1.21 から非推奨になったのか?
https://qiita.com/kiyoshim55/items/0262d42b57320bea2d00
Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller
https://kubernetes.io/docs/tasks/con
fi
gure-pod-container/migrate-from-psp/
Why is PodSecurityPolicy going away?
In the years since PodSecurityPolicy was
fi
rst introduced, we have realized that PSP has some serious
usability problems that canʼt be addressed without making breaking changes.
PodSecurityPolicy Deprecation: Past, Present, and Future
https://kubernetes.io/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/
(参考) Pod Security Policy廃止に関する情報
30. 4.1. Pod Security Admission - Namespaceに対するポリシー適用 -
# kubectl apply -f exploit-pod.yaml -n namespace-a
Error from server (Forbidden): error when creating "exploit-pod.yaml": pods "exploit-pod" is forbidden: violates
PodSecurity "baseline:v1.25": host namespaces (hostPID=true), privileged (container "ubuntu" must not set
securityContext.privileged=true)
# kubectl get po -n namespace-a
No resources found in namespace-a namespace.
# kubectl apply -f exploit-pod.yaml -n namespace-b
pod/exploit-pod created
# kubectl get po -n namespace-b
NAME READY STATUS RESTARTS AGE
exploit-pod 1/1 Running 0 7s
exploit-pod.yaml を各Namespaceに適用してみると、それぞれ以下のような結果になります。
namespace-bでは通常通りPodのデプロイが成功しているのに対し、ポリシーを適用したnamespace-aではエラーが表示され
Podのデプロイに失敗していることが分かります。
namespace-a(ポリシーが適用されている)
namespace-b(ポリシーが適用されていない)
Baselineポリシーに違反しているためPodのデプロイが拒否された
[Pod Security Admission]
enforce: baseline
audit: restricted
warn: restricted
33. 4.1. Pod Security Admission - Namespaceに対するポリシー適用 -
baseline-pod.yamlをnamespace-aに適用し、Podをデプロイしてみます。
すると警告メッセージが表示されつつ、Podのデプロイは成功していることが確認できます。
このようにPod Security Admissionではポリシーに準拠していないPodのデプロイを防止したり、
ポリシー違反による警告文言の表示やAudit Logへの記録を行うことができます。
# kubectl apply -f baseline-pod.yaml -n namespace-a
Warning: would violate PodSecurity "restricted:v1.25": allowPrivilegeEscalation != false (container "ubuntu" must set
securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "ubuntu" must set
securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "ubuntu" must set
securityContext.runAsNonRoot=true), seccompPro
fi
le (pod or container "ubuntu" must set
securityContext.seccompPro
fi
le.type to "RuntimeDefault" or "Localhost")
pod/baseline-pod created
# kubectl get po -n namespace-a
NAME READY STATUS RESTARTS AGE
baseline-pod 1/1 Running 0 35s
Restrictedポリシーに違反していることが警告として表示され、
Podがデプロイされた
[Pod Security Admission]
enforce: baseline
audit: restricted
warn: restricted
41. 4.3. Pod Security Admission - デフォルトポリシーの適用 -
Kubernetesクラスターのデフォルトポリシーやポリシー適用除外対象はAdmissionCon
fi
gurationとして定義することが
できます。
※ここで除外設定した対象についてはNamespaceにlabelsを付与してもポリシーが適用されなくなる
apiVersion: apiserver.con
fi
g.k8s.io/v1
kind: AdmissionCon
fi
guration
plugins:
- name: PodSecurity
con
fi
guration:
apiVersion: pod-security.admission.con
fi
g.k8s.io/v1
kind: PodSecurityCon
fi
guration
defaults: # デフォルトポリシーを定義
enforce: "baseline" # Baselineポリシーに違反するPodのデプロイを禁止
enforce-version: "v1.25"
audit: "restricted" # Restrictedポリシーに違反するPodのデプロイを検知した場合はAudit Logに記録(違反してもPodはデプロイされる)
audit-version: "v1.25"
warn: "restricted" # Restrictedポリシーに違反するPodのデプロイを検知した場合は警告を表示(違反してもPodはデプロイされる)
warn-version: "v1.25
exemptions: # ポリシー適用除外対象
usernames: [] # ポリシーを適用しないユーザーを指定する
runtimeClasses: [] # ポリシーを適用しないRuntimeClassを指定する
namespaces: # ポリシーを適用しないNamespaceを指定する
- kube-system
- namespace-c
pod-security.yaml
42. 4.3. Pod Security Admission - デフォルトポリシーの適用 -
A Guide to Kubernetes Admission Controllers
https://kubernetes.io/blog/2019/03/21/a-guide-to-kubernetes-admission-controllers/
(参考) KubernetesにおけるValidation/Mutation
一般的にKubernetesmではAPI Serverへのリクエスト時にAdmission Controllerと呼ばれる仕組みを用いてValidation/Mutationを
実現します。
Pod Security AdmissionについてもAdmission Controllerに含まれるAdmission Pluginと言う仕組みを用いて実現されています。
kube-apiserverの処理フロー
43. 4.3. Pod Security Admission - デフォルトポリシーの適用 -
apiVersion: v1
kind: Pod
metadata:
・・・
name: kube-apiserver
namespace: kube-system
spec:
containers:
- command:
- kube-apiserver
・・・
- --admission-control-con
fi
g-
fi
le=/etc/kubernetes/policies/pod-security.yaml
・・・
volumeMounts:
- mountPath: /etc/kubernetes/policies
name: policies
readOnly: true
・・・
volumes:
- name: policies
hostPath:
path: /etc/kubernetes/policies
type: DirectoryOrCreate
・・・
/etc/kubernetes/manifests/kube-apiserver.yaml (kubeadmの例)
AdmissionCon
fi
gurationをKubernetesクラスターに適用するには、kube-apiserverの起動オプション
--admission-control-con
fi
g-
fi
leで、AdmissionCon
fi
guration定義ファイルを指定します。
44. 4.3. Pod Security Admission - デフォルトポリシーの適用 -
# kubectl apply -f exploit-pod.yaml -n namespace-b
Error from server (Forbidden): error when creating "exploit-pod.yaml": pods "exploit-pod" is forbidden: violates
PodSecurity "baseline:v1.25": host namespaces (hostPID=true), privileged (container "ubuntu" must not set
securityContext.privileged=true)
# kubectl get po -n namespace-b
No resources found in namespace-b namespace.
# kubectl apply -f exploit-pod.yaml -n namespace-c
pod/exploit-pod created
# kubectl get po -n namespace-c
NAME READY STATUS RESTARTS AGE
exploit-pod 1/1 Running 0 20s
exploit-pod.yaml をnamespace-bとnamespace-cに適用してみます。
namespace-bにはデフォルトポリシーが適用されているためPodのデプロイに失敗していることが確認できます。
一方namespace-cではポリシーが適用されず、正常にPodのデプロイに成功していることが確認できます。
namespace-c(ポリシー適用除外対象として指定)
namespace-b(デフォルトポリシーが適用される)
ポリシーが適用されずPodのデプロイに成功している
Baselineポリシーに違反しているためPodのデプロイが拒否された
[Pod Security Admission]
enforce: baseline
audit: restricted
warn: restricted