diff --git a/cluster_for_OD.py b/cluster_for_OD.py index d4a05adcb0cfad97690ae5c9b3a0a8749f9b9e95..9212f5f3f67d9fce2ec189547b1dd7875242ebcc 100755 --- a/cluster_for_OD.py +++ b/cluster_for_OD.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os import argparse import pickle diff --git a/datasets.py b/datasets.py index 678ec7af5514ad3517c57af58ebab1f30ceeb88f..35646ac4dc53e3c1a11cd3083194642ed1a52858 100755 --- a/datasets.py +++ b/datasets.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os import torch import json diff --git a/main_corloc_evaluation.py b/main_corloc_evaluation.py index a4d9fb497b780d2d4fa1924db363b415732e7182..9cf4537694c4574a98a5a101efc9473443d2be46 100755 --- a/main_corloc_evaluation.py +++ b/main_corloc_evaluation.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os import cv2 import pdb diff --git a/main_lost.py b/main_lost.py index 15ae34c7a0454c34719b460daecf224b081b7abb..c4f29387d6d518c4fc06935436279d17d10d6f98 100755 --- a/main_lost.py +++ b/main_lost.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os import argparse import random diff --git a/networks.py b/networks.py index 40441bfccb7dd27a0f2dcd449c04f39425ccddac..e5af4295298dfef87f0cc9730bf782b1f5cff4dc 100755 --- a/networks.py +++ b/networks.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import torch import torch.nn as nn diff --git a/object_discovery.py b/object_discovery.py index a52c0e4ada8b251b936771fd963cd4c34d948a5d..42da074dcf089f4b4611de4e77627139b3c79fc6 100644 --- a/object_discovery.py +++ b/object_discovery.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import torch import scipy import scipy.ndimage @@ -109,6 +123,7 @@ def detect_box(A, seed, dims, initial_im_size=None, scales=None): def dino_seg(attn, dims, patch_size, head=0): """ Extraction of boxes based on the DINO segmentation method proposed in https://github.com/facebookresearch/dino. + Modified from https://github.com/facebookresearch/dino/blob/main/visualize_attention.py """ w_featmap, h_featmap = dims nh = attn.shape[1] diff --git a/tools/prepare_voc_LOST_CAD_pseudo_boxes_in_detectron2_format.py b/tools/prepare_voc_LOST_CAD_pseudo_boxes_in_detectron2_format.py index 22b528aa1a99e25686cf5620d9688c900b9b0ffb..1fbba66ba91ef1ff8b779b7e0da950ff22a078be 100755 --- a/tools/prepare_voc_LOST_CAD_pseudo_boxes_in_detectron2_format.py +++ b/tools/prepare_voc_LOST_CAD_pseudo_boxes_in_detectron2_format.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import argparse import os import pdb diff --git a/tools/prepare_voc_LOST_OD_pseudo_boxes_in_detectron2_format.py b/tools/prepare_voc_LOST_OD_pseudo_boxes_in_detectron2_format.py index cc065b755af553ecfb3ea24c49ad5ff69b7f2684..78036bdc8c513673cd6b3e33b7646e68c3bbfacf 100755 --- a/tools/prepare_voc_LOST_OD_pseudo_boxes_in_detectron2_format.py +++ b/tools/prepare_voc_LOST_OD_pseudo_boxes_in_detectron2_format.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import argparse import os import xml.etree.ElementTree as ET diff --git a/tools/prepare_voc_data_in_coco_style.py b/tools/prepare_voc_data_in_coco_style.py index 3ccec4176b5fd82fc57e56873d021a53e53bbf0c..5d2743ba3a34d15d4faca43e58a3a029f6d53db6 100755 --- a/tools/prepare_voc_data_in_coco_style.py +++ b/tools/prepare_voc_data_in_coco_style.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import argparse import os from os.path import join diff --git a/tools/train_net_for_LOST_CAD.py b/tools/train_net_for_LOST_CAD.py index 77177986ffe335f0e32e7f590669190750a3d4ff..bbac8cf0f8e1eae931439d2f654473e09d48dad1 100755 --- a/tools/train_net_for_LOST_CAD.py +++ b/tools/train_net_for_LOST_CAD.py @@ -1,20 +1,7 @@ #!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. -""" -Detection Training Script. - -This scripts reads a given config file and runs the training or evaluation. -It is an entry point that is made to train standard models in detectron2. - -In order to let one script support training of many models, -this script contains logic that are specific to these built-in models and therefore -may not be suitable for your own project. -For example, your research project perhaps only needs a single "evaluator". - -Therefore, we recommend you to use detectron2 as an library and take -this file as an example of how to use the library. -You may want to write your own script with your datasets and other customizations. -""" +# Copyright 2021 Valeo Comfort and Driving Assistance. All rights reserved. +# Adapted from detectron2. import logging import os diff --git a/tools/train_net_for_LOST_OD.py b/tools/train_net_for_LOST_OD.py index 3c46d20b12c65f919ffc46229444a6482d429971..d786509b4e671318f428db2a0b947a502b47d296 100755 --- a/tools/train_net_for_LOST_OD.py +++ b/tools/train_net_for_LOST_OD.py @@ -1,20 +1,7 @@ #!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. -""" -Detection Training Script. - -This scripts reads a given config file and runs the training or evaluation. -It is an entry point that is made to train standard models in detectron2. - -In order to let one script support training of many models, -this script contains logic that are specific to these built-in models and therefore -may not be suitable for your own project. -For example, your research project perhaps only needs a single "evaluator". - -Therefore, we recommend you to use detectron2 as an library and take -this file as an example of how to use the library. -You may want to write your own script with your datasets and other customizations. -""" +# Copyright 2021 Valeo Comfort and Driving Assistance. All rights reserved. +# Adapted from detectron2. import logging import os diff --git a/visualizations.py b/visualizations.py index 5ee43d01c5cec2f22f62491b76426a2e45f23886..867b311f00916d9e2bb4d117f2bf7eb477a433cc 100755 --- a/visualizations.py +++ b/visualizations.py @@ -1,3 +1,17 @@ +# Copyright 2021 - Valeo Comfort and Driving Assistance - Oriane Siméoni @ valeo.ai +# +# 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 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import cv2 import torch import skimage.io