repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/modeling/weighted_selection/MiniCPMV20/configuration_minicpm.py
null
null
null
null
null
null
Python
2026-05-04T02:41:48.122793
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/retriever/dense_retriever.py
null
null
null
null
null
null
Python
2026-05-04T02:41:48.712393
import gc import glob import logging import os import pickle import numpy as np import torch from ..arguments import InferenceArguments as EncodingArguments logger = logging.getLogger(__name__) def _retrieve_one_shard( corpus_shard_path: str, encoded_queries_tensor: torch.Tensor, topk: int, device: s...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/trainer/dense_trainer.py
null
null
null
null
null
null
Python
2026-05-04T02:41:48.735139
# Adapted from Tevatron (https://github.com/texttron/tevatron) import logging import os from typing import Any, Dict, Optional, Tuple, Union import shutil from contextlib import nullcontext import datasets import torch import torch.distributed as dist import torch.nn.functional as F from torch.utils.data import DataLo...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/modeling/modeling_minicpmv/modeling_minicpm.py
null
null
null
null
null
null
Python
2026-05-04T02:41:48.936928
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/examples/reward_function/dapo.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.287871
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.316358
# Adapted from Tevatron (https://github.com/texttron/tevatron) import csv import json import pathlib import warnings from dataclasses import dataclass from typing import Any, Dict, List import datasets import torch from transformers import PreTrainedTokenizer try: raise ModuleNotFoundError except ModuleNotFoundE...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/examples/reward_function/evidencecot.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.316900
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/examples/reward_function/math.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.520542
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/examples/reward_function/r1v.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.902050
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/examples/reward_function/test.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.919294
SUBSTITUTIONS = [ ("an ", ""), ("a ", ""), (".$", "$"), ("\\$", ""), (r"\ ", ""), (" ", ""), ("mbox", "text"), (",\\text{and}", ","), ("\\text{and}", ","), ("\\text{m}", "\\text{}"), ] REMOVED_EXPRESSIONS = [ "square", "ways", "integers", "dollars", "mph", ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/scripts/model_merger.py
null
null
null
null
null
null
Python
2026-05-04T02:41:49.984220
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/setup.py
null
null
null
null
null
null
Python
2026-05-04T02:41:50.073019
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/rsgrpo/tests/check_license.py
null
null
null
null
null
null
Python
2026-05-04T02:41:50.481617
# Copyright 2024 Bytedance Ltd. and/or its affiliates # # 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 ...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/modeling/weighted_selection/MiniCPMV20/modeling_minicpmv.py
null
null
null
null
null
null
Python
2026-05-04T02:41:52.760319
import math import json import timm import numpy as np import torch import torchvision from PIL import Image from timm.data import IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD from torchvision import transforms from transformers import LlamaTokenizer from transformers.integrations import is_deepspeed_zero3_enabled f...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/modeling/modeling_visrag_ret/modeling_visrag_ret.py
null
null
null
null
null
null
Python
2026-05-04T02:41:52.813993
import torch from dataclasses import dataclass from transformers.utils import ModelOutput from typing import Optional from ..modeling_minicpmv.modeling_minicpmv import MiniCPMV from concurrent.futures import ThreadPoolExecutor def transform_image_mp(img_list, transform, device, max_workers=None): pixel_values = [...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/modeling/weighted_selection/MiniCPMV20/resampler.py
null
null
null
null
null
null
Python
2026-05-04T02:41:52.846037
# Copyright (c) Alibaba Cloud. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from collections import OrderedDict import math import requests from io import BytesIO from functools import partial from PIL import Image from typing import Callable...
OpenBMB/VisRAG
https://github.com/OpenBMB/VisRAG
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
src/openmatch/modeling/weighted_selection/MiniCPMV20/modeling_minicpm.py
null
null
null
null
null
null
Python
2026-05-04T02:41:52.864749
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/base.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.428340
"""base translator class""" __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from abc import ABC, abstractmethod from pathlib import Path from typing import List, Optional, Union from deep_translator.constants import GOOGLE_LANGUAGES_TO_CODES from deep_translator.exceptions import ( InvalidSourceOrTargetLang...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.456858
"""Top-level package for Deep Translator""" __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from deep_translator.baidu import BaiduTranslator from deep_translator.chatgpt import ChatGptTranslator from deep_translator.deepl import DeeplTranslator from deep_translator.detection import batch_detection, single_detec...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/deepl.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.461062
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BASE_URLS, DEEPL_ENV_VAR, DEEPL_LANGUAGE_TO_CODE, ) from deep_translator.exceptions import ( ApiKeyE...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/cli.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.465903
"""Console script for deep_translator.""" __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import argparse from typing import Optional from deep_translator.engines import __engines__ class CLI(object): translators_dict = __engines__ translator = None def __init__(self, custom_args: Optional[list] ...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/constants.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.468473
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" OPEN_AI_ENV_VAR = "OPEN_API_KEY" DEEPL_ENV_VAR = "DEEPL_API_KEY" LIBRE_ENV_VAR = "LIBRE_API_KEY" MSFT_ENV_VAR = "MICROSOFT_API_KEY" QCRI_ENV_VAR = "QCRI_API_KEY" YANDEX_ENV_VAR = "YANDEX_API_KEY" TENCENT_SECRET_ID_ENV_VAR = "TENCENT_SECRET_ID" TENCENT_SECRET_KEY_EN...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/detection.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.469538
""" language detection API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import List, Optional, Union import requests from requests.exceptions import HTTPError # Module global config config = { "url": "https://ws.detectlanguage.com/0.2/detect", "headers": { "User-Agent": "Dete...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/baidu.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.473317
""" baidu translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import hashlib import os import random from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BAIDU_APPID_ENV_VAR, BAIDU_APPKEY_ENV_VAR, BA...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/engines.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.478036
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from deep_translator.base import BaseTranslator __engines__ = { translator.__name__.replace("Translator", "").lower(): translator for translator in BaseTranslator.__subclasses__() }
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/__main__.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.483681
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from deep_translator.cli import CLI def main(): CLI().run() if __name__ == "__main__": main()
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/chatgpt.py
null
null
null
null
null
null
Python
2026-05-04T02:42:04.485625
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional from deep_translator.base import BaseTranslator from deep_translator.constants import OPEN_AI_ENV_VAR from deep_translator.exceptions import ApiKeyException class ChatGptTranslator(BaseTranslator): """ class tha...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/libre.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.217848
""" LibreTranslate API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BASE_URLS, LIBRE_ENV_VAR, LIBRE_LANGUAGES_TO_CODES, ) from deep_translator.ex...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/exceptions.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.219072
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" class BaseError(Exception): """ base error structure class """ def __init__(self, val, message): """ @param val: actual value @param message: message shown to the user """ self.val = val self.message ...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/google.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.220142
""" google translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import List, Optional import requests from bs4 import BeautifulSoup from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS from deep_translator.exceptions import ( RequestError...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/papago.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.373308
""" papago translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import json from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, PAPAGO_LANGUAGE_TO_CODE from deep_translator.exceptions import Translation...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/mymemory.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.373852
""" mymemory translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import List, Optional, Union import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, MY_MEMORY_LANGUAGES_TO_CODES from deep_translator.exceptions import ( Req...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/microsoft.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.375916
# -*- coding: utf-8 -*- __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import logging import os import sys from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, MSFT_ENV_VAR from deep_translator.exceptions import ( ...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/tencent.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.377089
""" tencent translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import base64 import hashlib import hmac import os import time from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BASE_URLS, TENCENT_LANG...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/linguee.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.383108
""" linguee translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import List, Optional, Union import requests from bs4 import BeautifulSoup from requests.utils import requote_uri from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, LINGUEE_L...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/pons.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.386331
""" pons translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import List, Optional, Union import requests from bs4 import BeautifulSoup from requests.utils import requote_uri from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, PONS_CODES_T...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/qcri.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.388003
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BASE_URLS, QCRI_ENV_VAR, QCRI_LANGUAGE_TO_CODE, ) from deep_translator.exceptions import ( ApiKeyExc...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/yandex.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.823595
""" Yandex translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, YANDEX_ENV_VAR from deep_translator.exceptions import ( ApiKeyException,...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
deep_translator/validate.py
null
null
null
null
null
null
Python
2026-05-04T02:42:05.824630
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import Optional from deep_translator.exceptions import NotValidLength, NotValidPayload def is_empty(text: str) -> bool: return text == "" def request_failed(status_code: int) -> bool: """Check if a request has failed or not. A request is...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
examples/linguee.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.025316
from deep_translator import LingueeTranslator res = LingueeTranslator(source="german", target="english").translate( "laufen", return_all=False ) print(res)
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
examples/pons.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.027654
from deep_translator import PonsTranslator res = PonsTranslator(source="en", target="de").translate( "good", return_all=False ) print(res)
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
examples/trans.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.028402
from deep_translator import GoogleTranslator, LingueeTranslator, PonsTranslator # examples using google translate english_text = "happy coding" chinese_text = "這很好" translator = GoogleTranslator(source="auto", target="german") result1 = translator.translate(text=english_text) result2 = translator.translate(text=chine...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
examples/mymemory.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.031117
from deep_translator import MyMemoryTranslator res = MyMemoryTranslator(source="ar", target="en").translate("آخُذ اَلْباص.") print(res)
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
examples/libre.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.079074
from deep_translator import LibreTranslator res = LibreTranslator(source="de", target="en").translate("laufen") print(res)
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_baidu.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.079674
from unittest.mock import Mock, patch import pytest from deep_translator import BaiduTranslator from deep_translator.exceptions import BaiduAPIerror @patch("deep_translator.baidu.requests") def test_simple_translation(mock_requests): translator = BaiduTranslator( appid="this-is-an-valid-appid", ...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_cli.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.599434
#!/usr/bin/env python """Tests for the CLI interface.""" import sys import pytest from deep_translator.cli import CLI @pytest.fixture def mock_args(): sys.argv[1:] = ["--source", "en", "--target", "de", "--text", "hello"] return CLI(sys.argv[1:]).parse_args() def test_source(mock_args): assert mock_...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_data.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.652439
test_text_standard = "Hello world." TRANSLATED_RESULTS = { "afrikaans": "Hello Wêreld.", "albanian": "Përshendetje Botë.", "amharic": "ሰላም ልዑል.", "arabic": "مرحبا بالعالم.", "armenian": "Բարեւ աշխարհ.", "azerbaijani": "Salam dünya.", "basque": "Kaixo Mundua.", "belarusian": "Прывітанне ...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_deepl.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.753151
from unittest.mock import Mock, patch import pytest from deep_translator.deepl import DeeplTranslator from deep_translator.exceptions import AuthorizationException @patch("deep_translator.deepl.requests") def test_simple_translation(mock_requests): translator = DeeplTranslator( api_key="imagine-this-is-...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_google.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.757882
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import GoogleTranslator, exceptions from deep_translator.constants import GOOGLE_LANGUAGES_TO_CODES @pytest.fixture def google_translator(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/la...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_linguee.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.799021
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import LingueeTranslator, exceptions @pytest.fixture def linguee(): return LingueeTranslator(source="english", target="german") def test_content(linguee): """Sample pytest test function with the pytest fix...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_libre.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.799655
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import LibreTranslator, exceptions from deep_translator.constants import LIBRE_LANGUAGES_TO_CODES @pytest.fixture def libre(): return LibreTranslator(source="en", target="fr", api_key="some_key") def test_inpu...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_microsoft_trans.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.816216
#!/usr/bin/env python """Tests for `deep_translator` package.""" from unittest.mock import patch import pytest import requests from deep_translator import MicrosoftTranslator, exceptions # mocked request.post @patch.object(requests, "post") def test_microsoft_successful_post_mock(mock_request_post): returned_...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_tencent.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.866521
from unittest.mock import Mock, patch import pytest from deep_translator import TencentTranslator from deep_translator.exceptions import TencentAPIerror @patch("deep_translator.tencent.requests") def test_simple_translation(mock_requests): translator = TencentTranslator( secret_id="imagine-this-is-an-va...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_mymemory.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.880170
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import MyMemoryTranslator, exceptions @pytest.fixture def mymemory(): return MyMemoryTranslator(source="en-GB", target="fr-FR") def test_content(mymemory): """Sample pytest test function with the pytest fi...
nidhaloff/deep-translator
https://github.com/nidhaloff/deep-translator
null
null
null
null
1,998
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_pons.py
null
null
null
null
null
null
Python
2026-05-04T02:42:06.880764
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import PonsTranslator, exceptions @pytest.fixture def pons(): return PonsTranslator(source="english", target="french") def test_content(pons): """Sample pytest test function with the pytest fixture as an a...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/custom_solver.py
null
null
null
null
null
null
Python
2026-05-04T02:42:14.204910
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from enum import Enum import itertools from typing import Any, Callable, Dict, Iterable, List, Set, Type, Union import torch from detectron2.config import CfgNode from detectron2.solver.build import maybe_add_gradient_clipping def match_name_keyw...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/config.py
null
null
null
null
null
null
Python
2026-05-04T02:42:14.206558
# Copyright (c) Facebook, Inc. and its affiliates. from detectron2.config import CfgNode as CN def add_detic_config(cfg): _C = cfg _C.WITH_IMAGE_LABELS = False # Turn on co-training with classification data # Open-vocabulary classifier _C.MODEL.ROI_BOX_HEAD.USE_ZEROSHOT_CLS = False # Use fixed classi...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/custom_dataset_dataloader.py
null
null
null
null
null
null
Python
2026-05-04T02:42:14.312097
# Copyright (c) Facebook, Inc. and its affiliates. # Part of the code is from https://github.com/xingyizhou/UniDet/blob/master/projects/UniDet/unidet/data/multi_dataset_dataloader.py (Apache-2.0 License) import copy import logging import numpy as np import operator import torch import torch.utils.data import json from ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
configs/BoxSup_ViLD_200e.py
null
null
null
null
null
null
Python
2026-05-04T02:42:14.586759
# Copyright (c) Facebook, Inc. and its affiliates. import os import torch import detectron2.data.transforms as T from detectron2.config import LazyCall as L from detectron2.layers import ShapeSpec from detectron2.data.samplers import RepeatFactorTrainingSampler from detectron2.evaluation.lvis_evaluation import LVISEva...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/datasets/cc.py
null
null
null
null
null
null
Python
2026-05-04T02:42:14.657044
# Copyright (c) Facebook, Inc. and its affiliates. import logging import os from detectron2.data.datasets.builtin_meta import _get_builtin_metadata from detectron2.data.datasets.lvis import get_lvis_instances_meta from .lvis_v1 import custom_register_lvis_instances _CUSTOM_SPLITS = { "cc3m_v1_val": ("cc3m/validat...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/custom_dataset_mapper.py
null
null
null
null
null
null
Python
2026-05-04T02:42:14.703474
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import logging import numpy as np from typing import List, Optional, Union import torch import pycocotools.mask as mask_util from detectron2.config import configurable from detectron2.data import detection_utils as utils from detectron...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/datasets/lvis_v1.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.002553
# Copyright (c) Facebook, Inc. and its affiliates. import logging import os from fvcore.common.timer import Timer from detectron2.structures import BoxMode from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.data.datasets.lvis import get_lvis_instan...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/custom_build_augmentation.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.107608
# Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager from PIL import Image from detectron2.data import transforms as T from .transforms.custom_augmentation_impl import EfficientDetResizeCrop...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
configs/Detic_ViLD_200e.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.109145
# Copyright (c) Facebook, Inc. and its affiliates. import os import torch import detectron2.data.transforms as T from detectron2.config import LazyCall as L from detectron2.layers import ShapeSpec from detectron2.data.samplers import RepeatFactorTrainingSampler from detectron2.evaluation.lvis_evaluation import LVISEva...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
demo.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.109713
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import glob import multiprocessing as mp import numpy as np import os import tempfile import time import warnings import cv2 import tqdm import sys import mss from detectron2.config import get_cfg from detectron2.data.detection_utils import read_image ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/datasets/coco_zeroshot.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.231944
# Copyright (c) Facebook, Inc. and its affiliates. import os from detectron2.data.datasets.register_coco import register_coco_instances from detectron2.data.datasets.builtin_meta import _get_builtin_metadata from .lvis_v1 import custom_register_lvis_instances categories_seen = [ {'id': 1, 'name': 'person'}, {...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.401977
# Copyright (c) Facebook, Inc. and its affiliates. from .modeling.meta_arch import custom_rcnn from .modeling.roi_heads import detic_roi_heads from .modeling.roi_heads import res5_roi_heads from .modeling.backbone import swintransformer from .modeling.backbone import timm from .data.datasets import lvis_v1 from .data...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/datasets/imagenet.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.718440
# Copyright (c) Facebook, Inc. and its affiliates. import logging import os from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.data.datasets.lvis import get_lvis_instances_meta from .lvis_v1 import custom_load_lvis_json, get_lvis_22k_meta def custom_register_imagenet_instances(name, metadata, ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/transforms/custom_augmentation_impl.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.751710
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Part of the code is from https://github.com/rwightman/efficientdet-pytorch/blob/master/effdet/data/transforms.py # Modified by Xingyi Zhou # The original code is under Apache-2.0 License import numpy as np import sys from ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/evaluation/custom_coco_eval.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.753064
# Copyright (c) Facebook, Inc. and its affiliates. import contextlib import copy import io import itertools import json import logging import numpy as np import os import pickle from collections import OrderedDict import pycocotools.mask as mask_util import torch from pycocotools.coco import COCO from pycocotools.cocoe...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/transforms/custom_transform.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.754221
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Part of the code is from https://github.com/rwightman/efficientdet-pytorch/blob/master/effdet/data/transforms.py # Modified by Xingyi Zhou # The original code is under Apache-2.0 License import numpy as np import torch imp...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/evaluation/oideval.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.842278
# Part of the code is from https://github.com/tensorflow/models/blob/master/research/object_detection/metrics/oid_challenge_evaluation.py # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # The original code is under Apache License, Version 2.0 (the "License"); # Part of the code is from https://github.com/...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/backbone/swintransformer.py
null
null
null
null
null
null
Python
2026-05-04T02:42:15.976898
# -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ze Liu, Yutong Lin, Yixuan Wei # -------------------------------------------------------- # Copyright (c) Facebook, Inc. and its affiliate...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/backbone/timm.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.263094
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. import math from os.path import join import numpy as np import copy from functools import partial import torch from torch import nn import torch.utils.model_zoo as model_zoo import torch.nn.functional as F import fvcore.nn...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/meta_arch/custom_rcnn.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.348930
# Copyright (c) Facebook, Inc. and its affiliates. import copy import logging import numpy as np from typing import Dict, List, Optional, Tuple import torch from torch import nn import json from detectron2.utils.events import get_event_storage from detectron2.config import configurable from detectron2.structures import...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/debug.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.367193
# Copyright (c) Facebook, Inc. and its affiliates. import cv2 import numpy as np import torch import torch.nn.functional as F import os COLORS = ((np.random.rand(1300, 3) * 0.4 + 0.6) * 255).astype( np.uint8).reshape(1300, 1, 1, 3) def _get_color_image(heatmap): heatmap = heatmap.reshape( heatmap.shape[0], he...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/meta_arch/d2_deformable_detr.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.368891
# Copyright (c) Facebook, Inc. and its affiliates. import torch import torch.nn.functional as F from torch import nn import math from detectron2.modeling import META_ARCH_REGISTRY, build_backbone from detectron2.structures import Boxes, Instances from ..utils import load_class_freq, get_fed_loss_inds from models.bac...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/roi_heads/detic_fast_rcnn.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.443256
# Copyright (c) Facebook, Inc. and its affiliates. import logging import math import json import numpy as np from typing import Dict, Union import torch from fvcore.nn import giou_loss, smooth_l1_loss from torch import nn from torch.nn import functional as F import fvcore.nn.weight_init as weight_init import detectron2...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/roi_heads/detic_roi_heads.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.557122
# Copyright (c) Facebook, Inc. and its affiliates. import copy import numpy as np import json import math import torch from torch import nn from torch.autograd.function import Function from typing import Dict, List, Optional, Tuple, Union from torch.nn import functional as F from detectron2.config import configurable ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/data/datasets/objects365.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.687662
# Copyright (c) Facebook, Inc. and its affiliates. from detectron2.data.datasets.register_coco import register_coco_instances import os # categories_v2 = [ # {'id': 1, 'name': 'Person'}, # {'id': 2, 'name': 'Sneakers'}, # {'id': 3, 'name': 'Chair'}, # {'id': 4, 'name': 'Other Shoes'}, # {'id': 5, '...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/roi_heads/res5_roi_heads.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.880533
# Copyright (c) Facebook, Inc. and its affiliates. import inspect import logging import numpy as np from typing import Dict, List, Optional, Tuple import torch from torch import nn from detectron2.config import configurable from detectron2.layers import ShapeSpec, nonzero_tuple from detectron2.structures import Boxes,...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/text/text_encoder.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.946229
# This code is modified from https://github.com/openai/CLIP/blob/main/clip/clip.py # Modified by Xingyi Zhou # The original code is under MIT license # Copyright (c) Facebook, Inc. and its affiliates. from typing import Union, List from collections import OrderedDict import torch from torch import nn import torch from...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/roi_heads/zero_shot_classifier.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.977635
# Copyright (c) Facebook, Inc. and its affiliates. import numpy as np import torch from torch import nn from torch.nn import functional as F from detectron2.config import configurable from detectron2.layers import Linear, ShapeSpec class ZeroShotClassifier(nn.Module): @configurable def __init__( self, ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/predictor.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.986488
# Copyright (c) Facebook, Inc. and its affiliates. import atexit import bisect import multiprocessing as mp from collections import deque import cv2 import torch from detectron2.data import MetadataCatalog from detectron2.engine.defaults import DefaultPredictor from detectron2.utils.video_visualizer import VideoVisual...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
detic/modeling/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:42:16.987077
# Copyright (c) Facebook, Inc. and its affiliates. import torch import json import numpy as np from torch.nn import functional as F def load_class_freq( path='datasets/metadata/lvis_v1_train_cat_info.json', freq_weight=1.0): cat_info = json.load(open(path, 'r')) cat_info = torch.tensor( [c['image_c...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
lazy_train_net.py
null
null
null
null
null
null
Python
2026-05-04T02:42:17.111024
# Copyright (c) Facebook, Inc. and its affiliates. """ Training script using the new "LazyConfig" python config files. This scripts reads a given python config file and runs the training or evaluation. It can be used to train any models or dataset as long as they can be instantiated by the recursive construction define...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
predict.py
null
null
null
null
null
null
Python
2026-05-04T02:42:17.222630
import sys import cv2 import tempfile from pathlib import Path import cog import time # import some common detectron2 utilities from detectron2.engine import DefaultPredictor from detectron2.config import get_cfg from detectron2.utils.visualizer import Visualizer from detectron2.data import MetadataCatalog # Detic li...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/convert-thirdparty-pretrained-model-to-d2.py
null
null
null
null
null
null
Python
2026-05-04T02:42:17.499277
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import pickle import torch """ Usage: cd DETIC_ROOT/models/ wget https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/resnet50_miil_21k.pth python ../tools/convert-thirdparty-p...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/create_imagenetlvis_json.py
null
null
null
null
null
null
Python
2026-05-04T02:42:17.501098
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json import os import cv2 from nltk.corpus import wordnet from detectron2.data.detection_utils import read_image if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--imagenet_path', default='datasets/image...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/create_lvis_21k.py
null
null
null
null
null
null
Python
2026-05-04T02:42:17.855369
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import copy import json if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--imagenet_path', default='datasets/imagenet/annotations/imagenet-21k_image_info.json') parser.add_argument('--lvis_path', default='d...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/download_cc.py
null
null
null
null
null
null
Python
2026-05-04T02:42:17.856392
# Copyright (c) Facebook, Inc. and its affiliates. import os import json import argparse from PIL import Image import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--ann', default='datasets/cc3m/Train_GCC-training.tsv') parser.add_argument('--save_image_path...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/dump_clip_features.py
null
null
null
null
null
null
Python
2026-05-04T02:42:18.009339
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json import torch import numpy as np import itertools from nltk.corpus import wordnet import sys if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--ann', default='datasets/lvis/lvis_v1_val.json') par...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/get_imagenet_21k_full_tar_json.py
null
null
null
null
null
null
Python
2026-05-04T02:42:18.469321
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json import numpy as np import pickle import io import gzip import sys import time from nltk.corpus import wordnet from tqdm import tqdm import operator import torch sys.path.insert(0, 'third_party/CenterNet2/') sys.path.insert(0, 'third_party/D...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/get_lvis_cat_info.py
null
null
null
null
null
null
Python
2026-05-04T02:42:18.482331
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--ann", default='datasets/lvis/lvis_v1_train.json') parser.add_argument("--add_freq", action='store_true') parser.add_argument("--r_thresh", ...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/fix_o365_names.py
null
null
null
null
null
null
Python
2026-05-04T02:42:18.573319
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json import copy if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--ann", default='datasets/objects365/annotations/zhiyuan_objv2_val.json') parser.add_argument("--fix_name_map", default='datasets/met...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/merge_lvis_coco.py
null
null
null
null
null
null
Python
2026-05-04T02:42:18.574331
# Copyright (c) Facebook, Inc. and its affiliates. from collections import defaultdict import torch import sys import json import numpy as np from detectron2.structures import Boxes, pairwise_iou COCO_PATH = 'datasets/coco/annotations/instances_train2017.json' IMG_PATH = 'datasets/coco/train2017/' LVIS_PATH = 'dataset...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/fix_o365_path.py
null
null
null
null
null
null
Python
2026-05-04T02:42:18.874210
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json import path import os if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--ann", default='datasets/objects365/annotations/zhiyuan_objv2_train_fixname.json') parser.add_argument("--img_dir", defaul...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/remove_lvis_rare.py
null
null
null
null
null
null
Python
2026-05-04T02:42:19.074536
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import json if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--ann', default='datasets/lvis/lvis_v1_train.json') args = parser.parse_args() print('Loading', args.ann) data = json.load(open(args.ann...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/preprocess_imagenet22k.py
null
null
null
null
null
null
Python
2026-05-04T02:42:19.075276
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. import os import numpy as np import sys sys.path.insert(0, 'third_party/CenterNet2/') sys.path.insert(0, 'third_party/Deformable-DETR') from detic.data.tar_dataset import _TarDataset, DiskTarDataset import pickle import io import gzip import ti...
facebookresearch/Detic
https://github.com/facebookresearch/Detic
null
null
null
null
1,997
null
null
apache-2.0
null
null
null
null
null
null
null
tools/unzip_imagenet_lvis.py
null
null
null
null
null
null
Python
2026-05-04T02:42:19.168833
# Copyright (c) Facebook, Inc. and its affiliates. import os import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--src_path', default='datasets/imagenet/ImageNet-21K/') parser.add_argument('--dst_path', default='datasets/imagenet/ImageNet-LVIS/') parser.ad...