id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
2,283,600
frame.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/datasets/frame.py
#!/usr/bin/env python3 """ Copyright 2022 James Hong, Haotian Zhang, Matthew Fisher, Michael Gharbi, Kayvon Fatahalian Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above ...
56,812
Python
.py
1,327
31.962321
222
0.565224
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,601
json.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/datasets/json.py
from torch.utils.data import Dataset import numpy as np import random import os from tqdm import tqdm import torch import logging import json from .utils import ( feats2clip, getChunks_anchors, getTimestampTargets, oneHotToShifts, ) K_V2 = torch.FloatTensor( [ [ -100, ...
17,877
Python
.py
416
29.050481
153
0.526098
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,602
download_configtask.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/download_configtask.py
import urllib.request import os from tqdm import tqdm class MyProgressBar: def __init__(self, filename): self.pbar = None self.filename = filename def __call__(self, block_num, block_size, total_size): if not self.pbar: self.pbar = tqdm(total=total_size, unit="iB", unit_sc...
10,307
Python
.py
233
26.042918
115
0.4615
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,603
inference.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/inference/inference.py
import logging import os from oslactionspotting.apis.inference.utils import infer_and_process_predictions_e2e from oslactionspotting.core.utils.lightning import CustomProgressBar from oslactionspotting.datasets.builder import build_dataloader import pytorch_lightning as pl class Inferer: def __init__(self, cfg, ...
3,616
Python
.py
97
29.072165
84
0.632437
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,604
utils.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/inference/utils.py
""" Copyright 2022 James Hong, Haotian Zhang, Matthew Fisher, Michael Gharbi, Kayvon Fatahalian Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
18,340
Python
.py
462
29.943723
128
0.572159
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,605
builder.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/inference/builder.py
from .inference import Inferer, infer_E2E, infer_JSON, infer_SN def build_inferer(cfg, model, default_args=None): """Build a inferer from config dict. Args: cfg (dict): Config dict. It should at least contain the key "type". model: The model that will be used to infer. default_args (d...
956
Python
.py
20
40.9
79
0.676344
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,606
builder.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/visualize/builder.py
from .visualizer import Visualizer def build_visualizer(cfg, Default_args=None): """Build a visualizer from config dict. Args: cfg (dict): Config dict. default_args (dict | None, optional): Default initialization arguments. Default: None. Returns: inferer: The constru...
397
Python
.py
12
26.75
79
0.67979
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,607
visualizer.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/visualize/visualizer.py
import os import cv2 import json from oslactionspotting.core.utils.io import load_json def check_config(cfg): # assert cfg.dataset.test.path is not None and os.path.isfilecfg.dataset.test.path. return class Visualizer: """Visualier class used to visualize a video along with its predictions using opencv...
4,186
Python
.py
81
39.481481
147
0.603973
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,608
utils.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/evaluate/utils.py
""" Copyright 2022 James Hong, Haotian Zhang, Matthew Fisher, Michael Gharbi, Kayvon Fatahalian Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
28,074
Python
.py
619
36.615509
168
0.627173
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,609
builder.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/evaluate/builder.py
from .evaluate import Evaluator, evaluate_pred_JSON, evaluate_pred_SN, evaluate_pred_E2E def build_evaluator(cfg, default_args=None): """Build a evaluator from config dict. Args: cfg (dict): Config dict. It should at least contain the key "type". default_args (dict | None, optional): Default ...
938
Python
.py
19
42.631579
88
0.698031
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,610
evaluate.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/apis/evaluate/evaluate.py
from tabulate import tabulate from oslactionspotting.apis.evaluate.utils import ( compute_performances_mAP, get_closest_action_index, label2vector, non_maximum_supression, predictions2vector, store_eval_files_json, ) from oslactionspotting.core.utils.io import load_gz_json, load_text, load_json ...
9,296
Python
.py
221
32.59276
210
0.609851
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,611
trainer.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/trainer.py
""" Copyright 2022 James Hong, Haotian Zhang, Matthew Fisher, Michael Gharbi, Kayvon Fatahalian Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
13,599
Python
.py
308
31.37013
234
0.568742
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,612
io.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/utils/io.py
""" Copyright 2022 James Hong, Haotian Zhang, Matthew Fisher, Michael Gharbi, Kayvon Fatahalian Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
7,316
Python
.py
182
32.016484
126
0.631497
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,613
default_args.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/utils/default_args.py
def get_default_args_data_train_e2e_dali(cfg): return { "classes": cfg.classes, "train": True, "acc_grad_iter": cfg.training.acc_grad_iter, "num_epochs": cfg.training.num_epochs, "repartitions": cfg.repartitions, } def get_default_args_data_valid_e2e_dali(cfg): retu...
3,356
Python
.py
86
30.209302
85
0.604436
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,614
lightning.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/utils/lightning.py
import pytorch_lightning as pl from pytorch_lightning.callbacks.progress import TQDMProgressBar import logging class CustomProgressBar(TQDMProgressBar): """Override the custom progress bar used by pytorch lightning to change some attributes.""" def get_metrics(self, trainer, pl_module): """Override t...
2,027
Python
.py
41
40.560976
95
0.654684
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,615
nll.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/loss/nll.py
import torch class NLLLoss(torch.nn.Module): """Negative Log LikeLihood Loss.""" def __init__(self): super(NLLLoss, self).__init__() def forward(self, labels, output): """Forward function. Args: labels (torch.Tensor): The ground truth labels. output (tor...
607
Python
.py
18
24.333333
83
0.558419
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,616
ce.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/loss/ce.py
import torch import torch.nn.functional as F class CELoss(torch.nn.Module): """Cross Entropy Loss.""" def __init__(self): super(CELoss, self).__init__() def forward(self, labels, output, **ce_kwargs): """Forward function. Args: labels (torch.Tensor): The ground truth...
632
Python
.py
17
28.529412
67
0.612479
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,617
builder.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/loss/builder.py
from oslactionspotting.core.loss.ce import CELoss from .nll import NLLLoss from .calf import ContextAwareLoss, SpottingLoss from .combine import Combined2x def build_criterion(cfg, default_args=None): """Build a criterion from config dict. Args: cfg (dict): Config dict. It should at least contain the...
1,258
Python
.py
35
28.628571
79
0.640394
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,618
combine.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/loss/combine.py
import torch #################################################################################################################################################### # Combined loss function #################################################################################################################################...
1,193
Python
.py
29
33.206897
148
0.414422
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,619
calf.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/loss/calf.py
import torch #################################################################################################################################################### # Context-aware loss function ############################################################################################################################...
7,960
Python
.py
205
28.087805
148
0.452999
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,620
builder.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/optimizer/builder.py
import torch def build_optimizer(parameters, cfg, default_args=None): """Build a optimizer from config dict. Args: cfg (dict): Config dict. It should at least contain the key "type". default_args (dict | None, optional): Default initialization arguments. Default: None. Return...
825
Python
.py
25
24.16
79
0.594221
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,621
builder.py
OpenSportsLab_OSL-ActionSpotting/oslactionspotting/core/scheduler/builder.py
""" Copyright 2022 James Hong, Haotian Zhang, Matthew Fisher, Michael Gharbi, Kayvon Fatahalian Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
3,070
Python
.py
64
41.203125
83
0.716383
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,622
test_simple.py
OpenSportsLab_OSL-ActionSpotting/tests/test_simple.py
import pytest def test_simple(): assert 1 + 1 == 2
57
Python
.py
3
16
21
0.653846
OpenSportsLab/OSL-ActionSpotting
8
1
2
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,623
feature.py
gh203322_image-search-by-image/feature.py
import torch import torch.nn as nn from torchvision import models, transforms from torch.autograd import Variable import cv2 import numpy as np from sklearn.decomposition import PCA # 图片缩放大小 IMG_SCALE_SIZE_W = 224 IMG_SCALE_SIZE_H = 224 # 加载特征提取模型 FE_MODEL = models.resnet50(pretrained=True) # 导入ResNet50的预训练模型 """ ...
2,123
Python
.py
56
26.160714
79
0.704225
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,624
setting.py
gh203322_image-search-by-image/setting.py
# -*- coding: UTF-8 -*- import os # 程序配置 # 应用启动端口 API_PORT = os.environ.get('API_PORT') if not API_PORT: API_PORT = 7000 TOKEN = os.environ.get('TOKEN') # 向量数据库地址(必要配置参数) MILVUS_HOST = os.environ.get('MILVUS_HOST') # 向量数据库端口 MILVUS_PORT = os.environ.get('MILVUS_PORT') if not MILVUS_PORT: MILVUS_PORT = 11088...
1,073
Python
.py
32
26.15625
68
0.717314
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,625
api.py
gh203322_image-search-by-image/api.py
# -*- coding: UTF-8 -*- from fastapi import FastAPI, File, UploadFile, Form, Header from fastapi.responses import JSONResponse from typing import Union from typing import Optional from typing_extensions import Annotated from pydantic import BaseModel import base64 import setting as ST import milvus as MV import featur...
11,430
Python
.py
287
27.581882
103
0.624718
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,626
init.py
gh203322_image-search-by-image/init.py
# -*- coding: UTF-8 -*- import os import shutil import setting as ST import utils as UT import milvus as MV import feature as FT """ 方法:初始化默认目录里面的图片,如果存在则导入向量数据库 参数: """ def run(): # 创建向量数据库 MV.create_milvus_collection(MV.EB_TB_NAME, MV.EB_DB_DIM) # 如果初始化目录有图片则初始化图片 if ST.IMAGE_INC_PATH: inc...
1,704
Python
.py
41
22.731707
78
0.511236
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,627
utils.py
gh203322_image-search-by-image/utils.py
import os import hashlib import requests import cv2 # 获取路径下所有的文件 def get_files_by_suffix(path, suffix_list): file_list = [] for root, dirs, files in os.walk(path): for filename in files: ext = os.path.splitext(filename)[1] if ext in suffix_list: file_path = os.p...
3,356
Python
.py
90
22.788889
85
0.603702
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,628
milvus.py
gh203322_image-search-by-image/milvus.py
# -*- coding: UTF-8 -*- from pymilvus import ( connections, utility, FieldSchema, CollectionSchema, DataType, Collection, ) import setting as ST # 图片向量库名称(表名) EB_TB_NAME = 'images' # 图片向量库维度 EB_DB_DIM = 2048 #Milvus 支持的最大向量维度是32768,一般情况为了检索性能建议在1024-2048 # 全局 Milvus 连接对象 connections.connect...
6,341
Python
.py
192
21.526042
116
0.553705
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,629
main.py
gh203322_image-search-by-image/main.py
# -*- coding: UTF-8 -*- import uvicorn import api import init import setting as ST import utils as UT import feature as FT app = api.app # 主入口 if __name__ == '__main__': # 初始化图库和导入增量图片 init.run() uvicorn.run("main:app", host="0.0.0.0", port=ST.API_PORT, reload=True)
311
Python
.py
13
19.538462
74
0.676692
gh203322/image-search-by-image
8
1
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,630
daam.py
ltdrdata_ComfyUI-Impact-Exp/daam.py
from torch import nn class AttentionLogger: def __init__(self, heat_maps): self.heat_maps = heat_maps def __call__(self, q, k, v, extra_options): org_dtype = q.dtype with torch.autocast(device_type=self.device, dtype=self.dtype): out = optimized_attention(q, k, v, extra_op...
1,879
Python
.py
45
32.755556
86
0.58052
ltdrdata/ComfyUI-Impact-Exp
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,631
__init__.py
ltdrdata_ComfyUI-Impact-Exp/__init__.py
import importlib import os node_list = [ "flex", "daam" ] NODE_CLASS_MAPPINGS = {} NODE_DISPLAY_NAME_MAPPINGS = {} for module_name in node_list: imported_module = importlib.import_module(".{}".format(module_name), __name__) NODE_CLASS_MAPPINGS = {**NODE_CLASS_MAPPINGS, **imported_module.NODE_CLASS_M...
544
Python
.py
14
36.071429
109
0.712381
ltdrdata/ComfyUI-Impact-Exp
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,632
flex.py
ltdrdata_ComfyUI-Impact-Exp/flex.py
import inspect class FlexTest: @classmethod def INPUT_TYPES(s): flex_inputs = {} stack = inspect.stack() if stack[1].function == 'get_input_data': # bypass validation for x in range(0, 20): flex_inputs[f"input{x}"] = (["aaa", "bbb", "ccc"],) ...
810
Python
.py
28
20.178571
78
0.479948
ltdrdata/ComfyUI-Impact-Exp
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,633
test.py
miniTalDev_yolov5-lip-detection/test.py
import argparse import glob import json import os import shutil from pathlib import Path import numpy as np import torch import yaml from tqdm import tqdm from models.experimental import attempt_load from utils.datasets import create_dataloader from utils.general import ( coco80_to_coco91_class, check_dataset, ch...
13,588
Python
.py
255
42
119
0.561983
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,634
sotabench.py
miniTalDev_yolov5-lip-detection/sotabench.py
import argparse import glob import os import shutil from pathlib import Path import numpy as np import torch import yaml from sotabencheval.object_detection import COCOEvaluator from sotabencheval.utils import is_server from tqdm import tqdm from models.experimental import attempt_load from utils.datasets import crea...
14,274
Python
.py
277
42.021661
120
0.552119
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,635
tutorial.ipynb
miniTalDev_yolov5-lip-detection/tutorial.ipynb
{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "YOLOv5 Tutorial", "provenance": [], "collapsed_sections": [], "toc_visible": true, "include_colab_link": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "a...
3,276,585
Python
.py
758
4,313.667546
1,056,923
0.945577
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,636
train.py
miniTalDev_yolov5-lip-detection/train.py
import argparse import logging import os import random import shutil import time from pathlib import Path from warnings import warn import math import numpy as np import torch.distributed as dist import torch.nn.functional as F import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler import torch.ut...
28,259
Python
.py
476
47.783613
120
0.570264
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,637
detect.py
miniTalDev_yolov5-lip-detection/detect.py
import argparse import os import shutil import time from pathlib import Path import cv2 import torch import torch.backends.cudnn as cudnn from numpy import random from models.experimental import attempt_load from utils.datasets import LoadStreams, LoadImages from utils.general import ( check_img_size, non_max_sup...
7,787
Python
.py
147
42.37415
119
0.584132
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,638
hubconf.py
miniTalDev_yolov5-lip-detection/hubconf.py
"""File for accessing YOLOv5 via PyTorch Hub https://pytorch.org/hub/ Usage: import torch model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True, channels=3, classes=80) """ dependencies = ['torch', 'yaml'] import os import torch from models.yolo import Model from utils.google_utils import ...
3,475
Python
.py
75
39.613333
116
0.681778
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,639
export.py
miniTalDev_yolov5-lip-detection/models/export.py
"""Exports a YOLOv5 *.pt model to ONNX and TorchScript formats Usage: $ export PYTHONPATH="$PWD" && python models/export.py --weights ./weights/yolov5s.pt --img 640 --batch 1 """ import argparse import sys import time sys.path.append('./') # to run '$ python *.py' files in subdirectories import torch import to...
3,729
Python
.py
77
42.090909
117
0.646217
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,640
yolo.py
miniTalDev_yolov5-lip-detection/models/yolo.py
import argparse import logging import sys from copy import deepcopy from pathlib import Path import math sys.path.append('./') # to run '$ python *.py' files in subdirectories logger = logging.getLogger(__name__) import torch import torch.nn as nn from models.common import Conv, Bottleneck, SPP, DWConv, Focus, Bot...
12,350
Python
.py
241
40.970954
116
0.535223
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,641
experimental.py
miniTalDev_yolov5-lip-detection/models/experimental.py
# This file contains experimental modules import numpy as np import torch import torch.nn as nn from models.common import Conv, DWConv from utils.google_utils import attempt_download class CrossConv(nn.Module): # Cross Convolution Downsample def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False): ...
5,565
Python
.py
118
38.457627
117
0.562546
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,642
common.py
miniTalDev_yolov5-lip-detection/models/common.py
# This file contains modules common to various models import math import numpy as np import torch import torch.nn as nn from utils.datasets import letterbox from utils.general import non_max_suppression, make_divisible, scale_coords def autopad(k, p=None): # kernel, padding # Pad to 'same' if p is None: ...
7,226
Python
.py
144
42.861111
117
0.588636
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,643
test.py
miniTalDev_yolov5-lip-detection/models/mine/test.py
from imutils.video import VideoStream from imutils.video import FPS import numpy as np import argparse import imutils import time import cv2 CLASSES = ["background", "aeroplane", "bicycle", "bird"] COLORS = np.random.uniform(0, 255, size=(len(CLASSES), 3)) # load our serialized model from disk print("[INFO] loading ...
1,098
Python
.py
31
34.290323
68
0.726246
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,644
open.py
miniTalDev_yolov5-lip-detection/models/mine/open.py
import onnx import cv2 # onnx_model = onnx.load( 'best.onnx') # onnx.checker.check_model(onnx_model) model = cv2.dnn.readNetFromONNX('best.onnx')
148
Python
.py
5
28.2
44
0.765957
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,645
general.py
miniTalDev_yolov5-lip-detection/utils/general.py
import glob import logging import os import platform import random import re import shutil import subprocess import time from contextlib import contextmanager from copy import copy from pathlib import Path import cv2 import math import matplotlib import matplotlib.pyplot as plt import numpy as np import torch import t...
54,154
Python
.py
1,066
42.772045
120
0.574799
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,646
datasets.py
miniTalDev_yolov5-lip-detection/utils/datasets.py
import glob import os import random import shutil import time from pathlib import Path from threading import Thread import cv2 import math import numpy as np import torch from PIL import Image, ExifTags from torch.utils.data import Dataset from tqdm import tqdm from utils.general import xyxy2xywh, xywh2xyxy, torch_di...
39,107
Python
.py
778
38.922879
238
0.533499
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,647
torch_utils.py
miniTalDev_yolov5-lip-detection/utils/torch_utils.py
import logging import os import time from copy import deepcopy import math import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torchvision logger = logging.getLogger(__name__) def init_torch_seeds(seed=0): torch.manual_seed(seed) # Speed-reproducib...
8,861
Python
.py
182
40.89011
119
0.624652
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,648
google_utils.py
miniTalDev_yolov5-lip-detection/utils/google_utils.py
# This file contains google utils: https://cloud.google.com/storage/docs/reference/libraries # pip install --upgrade google-cloud-storage # from google.cloud import storage import os import platform import subprocess import time from pathlib import Path import torch def gsutil_getsize(url=''): # gs://bucket/fil...
4,971
Python
.py
103
42.533981
118
0.641163
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,649
activations.py
miniTalDev_yolov5-lip-detection/utils/activations.py
import torch import torch.nn as nn import torch.nn.functional as F # Swish https://arxiv.org/pdf/1905.02244.pdf --------------------------------------------------------------------------- class Swish(nn.Module): # @staticmethod def forward(x): return x * torch.sigmoid(x) class Hardswish(nn.Module):...
2,176
Python
.py
53
33.622642
120
0.536087
miniTalDev/yolov5-lip-detection
8
0
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,650
run.py
esl-epfl_sz-validation-framework/3-runSzDetection/run.py
import argparse from pathlib import Path import subprocess if __name__ == "__main__": parser = argparse.ArgumentParser( description="Run dockerized sz detection on all EEG files" ) parser.add_argument("input", help="Path to root of the EDF EEG files.") args = parser.parse_args() for edf in...
829
Python
.py
26
21.5
76
0.510101
esl-epfl/sz-validation-framework
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,651
__main__.py
esl-epfl_sz-validation-framework/3-runSzDetection/docker-szDetection/algo/src/algo/__main__.py
if __name__ == "__main__": import argparse from algo.sz_detection import szDetection parser = argparse.ArgumentParser( description="Run a seizure detection algorithm on an EDF file and store computed seizure annotations to a TSV." ) parser.add_argument("input", help="Path to the input EDF E...
486
Python
.py
10
43.4
119
0.71097
esl-epfl/sz-validation-framework
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,652
sz_detection.py
esl-epfl_sz-validation-framework/3-runSzDetection/docker-szDetection/algo/src/algo/sz_detection.py
from pathlib import Path import numpy as np import pyedflib import epilepsy2bids.annotations from epilepsy2bids.eeg import Eeg import timescoring.annotations import timescoring.scoring def szDetection(edfFile: str, outFile: str): """Run a seizure detection algorithm on an EDF file. The algorithm implemente...
2,140
Python
.py
52
34.807692
83
0.698749
esl-epfl/sz-validation-framework
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,653
__main__.py
esl-epfl_sz-validation-framework/4-evaluate/src/evaluate/__main__.py
if __name__ == "__main__": import argparse from evaluate.evaluate import evaluate parser = argparse.ArgumentParser( description="Evaluation code to compare annotations from a seizure detection algorithm to ground truth annotations." ) parser.add_argument("ref", help="Path to the root folder...
527
Python
.py
10
47.6
124
0.734496
esl-epfl/sz-validation-framework
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,654
evaluate.py
esl-epfl_sz-validation-framework/4-evaluate/src/evaluate/evaluate.py
from pathlib import Path import numpy as np import pandas as pd from epilepsy2bids.annotations import Annotations, SeizureType from timescoring import annotations, scoring FS = 256 def toMask(annotations): mask = np.zeros(int(annotations.events[0]["recordingDuration"] * FS)) for event in annotations.events...
3,667
Python
.py
101
28.742574
86
0.5819
esl-epfl/sz-validation-framework
8
1
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,655
__init__.py
XTxiaoting14332_nonebot-plugin-muteme/nonebot_plugin_muteme/__init__.py
from nonebot.adapters.onebot.v11 import Message, MessageSegment from nonebot.adapters.onebot.v11 import Bot, Event, GroupMessageEvent, GROUP_ADMIN, GROUP_OWNER from nonebot.permission import SUPERUSER import nonebot import random, re import datetime from nonebot.plugin import PluginMetadata, on_regex from nonebot.exce...
1,869
Python
.py
45
35.088889
95
0.697376
XTxiaoting14332/nonebot-plugin-muteme
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,656
Plotter.py
joaquinbarroso_UVeh-Vis/Plotter.py
#!/usr/bin/python3 import matplotlib.pyplot as plt import math as math import numpy as np def lotz(osc,nm,dev): sup=1.3062974e8*(2/math.pi)**0.5*osc*(dev/1e14) inf=4*((1/i)-(1/nm))**2+(dev/1e7)**2 global ABSn ABSn=sup/inf return ABSn def gau(osc,nm,dev): exp=-1*(((1/i)-(1/nm)...
3,887
Python
.py
103
26.893204
122
0.508628
joaquinbarroso/UVeh-Vis
8
2
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,657
Main.py
EstebanZxx_X-Tools/Main.py
import os,time,zlib,base64 from time import sleep from sys import stdin, stdout, stderr from argparse import ArgumentParser from pathlib import Path from base64 import b64decode from Crypto.Protocol.KDF import PBKDF2 from Crypto.Cipher import AES from Crypto.Hash import SHA256 from Crypto.Util.Padding import unpad from...
4,851
Python
.py
121
33.214876
113
0.632865
EstebanZxx/X-Tools
8
5
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,658
XTools.py
EstebanZxx_X-Tools/XTools.py
import os black="\033[0;30m" red="\033[0;31m" green="\033[0;32m" yellow="\033[0;33m" blue="\033[0;34m" purple="\033[0;35m" cyan="\033[0;36m" white="\033[0;37m" XTools = """ ██╗░░██╗  ░░░░░░  ████████╗░█████╗░░█████╗░██╗░â–...
2,977
Python
.py
62
42.935484
177
0.487348
EstebanZxx/X-Tools
8
5
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,659
NM.py
EstebanZxx_X-Tools/X/NM.py
import base64 from Crypto.Cipher import AES import json import os import glob Ezxx = ("This Script Generated By : EstebanZxx\nBeta Test Module : V1\n=====================================\nResult Decrypt : ") def decrypt_aes_ecb_128(ciphertext, key): cipher = AES.new(key, AES.MODE_ECB) plaintext = cipher.decry...
1,120
Python
.py
28
35.428571
129
0.66946
EstebanZxx/X-Tools
8
5
1
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,660
demo.py
Leaf-0010_cell_detection/demo.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'demo.ui' # # Created by: PyQt5 UI code generator 5.15.9 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
61,370
Python
.py
1,457
36.594372
339
0.694404
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,661
test.py
Leaf-0010_cell_detection/test.py
import glob import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QPushButton, QVBoxLayout, QWidget, QFileDialog from PyQt5.QtGui import QPixmap from PyQt5.QtCore import Qt from detect import * class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init_...
3,188
Python
.py
69
33.565217
110
0.64549
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,662
export.py
Leaf-0010_cell_detection/export.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Export a YOLOv5 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit Format | `export.py --include` | Model --- | --- | --- PyTorch ...
29,985
Python
.py
524
46.71374
151
0.593423
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,663
tutorial.ipynb
Leaf-0010_cell_detection/tutorial.ipynb
{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "YOLOv5 Tutorial", "provenance": [], "collapsed_sections": [], "machine_shape": "hm", "include_colab_link": true }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, ...
57,230
Python
.py
1,115
41.055605
849
0.492899
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,664
val.py
Leaf-0010_cell_detection/val.py
# YOLOv5 üöÄ by Ultralytics, GPL-3.0 license """ Validate a trained YOLOv5 model accuracy on a custom dataset Usage: $ python path/to/val.py --weights yolov5s.pt --data coco128.yaml --img 640 Usage - formats: $ python path/to/val.py --weights yolov5s.pt # PyTorch ...
19,460
Python
.py
346
46.034682
122
0.587276
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,665
train.py
Leaf-0010_cell_detection/train.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Train a YOLOv5 model on a custom dataset. Models and datasets download automatically from the latest YOLOv5 release. Models: https://github.com/ultralytics/yolov5/tree/master/models Datasets: https://github.com/ultralytics/yolov5/tree/master/data Tutorial: https://gith...
34,919
Python
.py
591
46.993232
120
0.569401
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,666
data_process_core.py
Leaf-0010_cell_detection/data_process_core.py
import cv2 import numpy as np # 读取二值图像 image = cv2.imread('1.png', cv2.IMREAD_GRAYSCALE) # 确保成功读取图像 if image is not None: # 二值化图像 ret, binary_image = cv2.threshold(image, 127, 255, cv2.THRESH_BINARY) # 查找轮廓 contours, _ = cv2.findContours(binary_image, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_S...
1,074
Python
.py
28
27.571429
93
0.638732
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,667
detect.py
Leaf-0010_cell_detection/detect.py
# YOLOv5 üöÄ by Ultralytics, GPL-3.0 license """ Run inference on images, videos, directories, streams, etc. Usage - sources: $ python path/to/detect.py --weights yolov5s.pt --source 0 # webcam img.jpg # image ...
13,628
Python
.py
230
46.782609
120
0.567355
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,668
main.py
Leaf-0010_cell_detection/main.py
import csv import sys from datetime import datetime import pandas as pd import pymysql import glob import os import random from PIL import Image from PyQt5.QtCore import QTimer, QDate, Qt from PyQt5.QtCore import QDateTime from PyQt5.QtGui import QStandardItemModel, QStandardItem from PyQt5.QtWidgets i...
33,143
Python
.py
690
31.607246
192
0.56441
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,669
hubconf.py
Leaf-0010_cell_detection/hubconf.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/ Usage: import torch model = torch.hub.load('ultralytics/yolov5', 'yolov5s') model = torch.hub.load('ultralytics/yolov5:master', 'custom', 'path/to/yolov5s.onnx') # file from branch """ import ...
6,396
Python
.py
106
53.641509
109
0.69936
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,670
data_precess_malaria.py
Leaf-0010_cell_detection/data_precess_malaria.py
import pandas as pd import json import os def convert_to_yolov5_format(data, image_width, image_height): yolov5_labels = [] label_mapping = { 'gametocyte': 0, 'trophozoite': 1, 'leukocyte': 2, 'difficult': 3, 'red blood cell': 4, 'schizont': 5, ...
2,054
Python
.py
51
28.901961
84
0.576986
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,671
yolo.py
Leaf-0010_cell_detection/models/yolo.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ YOLO-specific modules Usage: $ python path/to/models/yolo.py --cfg yolov5s.yaml """ import argparse import os import platform import sys from copy import deepcopy from pathlib import Path FILE = Path(__file__).resolve() ROOT = FILE.parents[1] # YOLOv5 root direc...
15,354
Python
.py
295
42.345763
120
0.552544
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,672
experimental.py
Leaf-0010_cell_detection/models/experimental.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Experimental modules """ import math import numpy as np import torch import torch.nn as nn from models.common import Conv from utils.downloads import attempt_download class Sum(nn.Module): # Weighted sum of 2 or more layers https://arxiv.org/abs/1911.09070 d...
4,146
Python
.py
87
39.563218
116
0.591044
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,673
common.py
Leaf-0010_cell_detection/models/common.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Common modules """ import json import math import platform import warnings from collections import OrderedDict, namedtuple from copy import copy from pathlib import Path import cv2 import numpy as np import pandas as pd import requests import torch import torch.nn as ...
35,329
Python
.py
638
44.595611
119
0.563066
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,674
tf.py
Leaf-0010_cell_detection/models/tf.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ TensorFlow, Keras and TFLite versions of YOLOv5 Authored by https://github.com/zldrobit in PR https://github.com/ultralytics/yolov5/pull/1127 Usage: $ python models/tf.py --weights yolov5s.pt Export: $ python path/to/export.py --weights yolov5s.pt --include sa...
25,502
Python
.py
482
41.925311
120
0.559732
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,675
common.cpython-39.pyc
Leaf-0010_cell_detection/models/__pycache__/common.cpython-39.pyc
a 2ªdŠã@sÊdZddlZddlZddlZddlZddlmZmZddlmZddl m Z ddl Z ddl Z ddlZddlZddlZddlmZddlZddlmZddlmZddlmZmZdd lmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'dd l(m)Z)m*Z*m+Z+dd l,m-Z-m.Z.d@d d „Z/...
32,327
Python
.py
185
173.691892
2,204
0.362132
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,676
tf.cpython-37.pyc
Leaf-0010_cell_detection/models/__pycache__/tf.cpython-37.pyc
B ,Å­b�cã@sàdZddlZddlZddlmZddlmZeeƒ ¡Z e j dZ e e ƒej kr`ej  e e ƒ¡ddlZddlZddlZddlmZddlmZddlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'dd l(m)Z)dd l*m+Z+dd l,m-Z-m.Z.m/Z/Gd d „d ej0...
25,429
Python
.py
167
151.11976
1,078
0.378805
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,677
yolo.cpython-37.pyc
Leaf-0010_cell_detection/models/__pycache__/yolo.cpython-37.pyc
B .ªdú;ã @sÀdZddlZddlZddlZddlZddlmZddlmZee ƒ  ¡Z e j dZ ee ƒejkrpej ee ƒ¡e ¡dkr’eej e e ¡¡ƒZ ddlTddlTddlmZdd lmZmZmZmZmZdd lmZdd l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'y ddl(Z(Wne)k �r ...
13,058
Python
.py
121
106.735537
924
0.395361
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,678
common.cpython-37.pyc
Leaf-0010_cell_detection/models/__pycache__/common.cpython-37.pyc
B 0ªdŠã@sÊdZddlZddlZddlZddlZddlmZmZddlmZddl m Z ddl Z ddl Z ddlZddlZddlZddlmZddlZddlmZddlmZddlmZmZdd lmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'dd l(m)Z)m*Z*m+Z+dd l,m-Z-m.Z.d@d d „Z/Gd...
33,022
Python
.py
187
175.540107
2,462
0.363625
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,679
experimental.cpython-37.pyc
Leaf-0010_cell_detection/models/__pycache__/experimental.cpython-37.pyc
B .ªd2ã@s„dZddlZddlZddlZddlmZddlmZddl m Z Gdd„dej ƒZ Gdd„dej ƒZ Gd d „d ejƒZdd d „ZdS)z Experimental modules éN)ÚConv)Úattempt_downloadcs&eZdZd‡fdd„ Zdd„Z‡ZS)ÚSumFc...
4,901
Python
.py
35
138.914286
1,200
0.401479
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,680
general.py
Leaf-0010_cell_detection/utils/general.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ General utils """ import contextlib import glob import inspect import logging import math import os import platform import random import re import shutil import signal import threading import time import urllib from datetime import datetime from itertools import repeat...
41,842
Python
.py
820
43.465854
121
0.600039
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,681
dataloaders.py
Leaf-0010_cell_detection/utils/dataloaders.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Dataloaders and dataset utils """ import glob import hashlib import json import math import os import random import shutil import time from itertools import repeat from multiprocessing.pool import Pool, ThreadPool from pathlib import Path from threading import Thread f...
47,683
Python
.py
942
38.53397
120
0.540514
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,682
torch_utils.py
Leaf-0010_cell_detection/utils/torch_utils.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ PyTorch utils """ import math import os import platform import subprocess import time import warnings from contextlib import contextmanager from copy import deepcopy from pathlib import Path import torch import torch.distributed as dist import torch.nn as nn import to...
13,717
Python
.py
262
43.683206
120
0.60682
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,683
autoanchor.py
Leaf-0010_cell_detection/utils/autoanchor.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ AutoAnchor utils """ import random import numpy as np import torch import yaml from tqdm import tqdm from utils.general import LOGGER, colorstr, emojis PREFIX = colorstr('AutoAnchor: ') def check_anchor_order(m): # Check anchor order against stride order for Y...
7,443
Python
.py
144
44.0625
119
0.598928
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,684
augmentations.py
Leaf-0010_cell_detection/utils/augmentations.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Image augmentation functions """ import math import random import cv2 import numpy as np from utils.general import LOGGER, check_version, colorstr, resample_segments, segment2box from utils.metrics import bbox_ioa class Albumentations: # YOLOv5 Albumentations c...
11,910
Python
.py
230
42.982609
118
0.565543
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,685
plots.py
Leaf-0010_cell_detection/utils/plots.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Plotting utils """ import math import os from copy import copy from pathlib import Path from urllib.error import URLError import cv2 import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sn import torch from PIL imp...
21,021
Python
.py
424
40.799528
120
0.574567
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,686
metrics.py
Leaf-0010_cell_detection/utils/metrics.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Model validation metrics """ import math import warnings from pathlib import Path import matplotlib.pyplot as plt import numpy as np import torch def fitness(x): # Model fitness as a weighted combination of metrics w = [0.0, 0.0, 0.1, 0.9] # weights for [P,...
14,361
Python
.py
290
41.096552
120
0.567471
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,687
downloads.py
Leaf-0010_cell_detection/utils/downloads.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Download utils """ import logging import os import platform import subprocess import time import urllib from pathlib import Path from zipfile import ZipFile import requests import torch def is_url(url): # Check if online file exists try: r = urllib.r...
7,111
Python
.py
152
40.111842
120
0.62527
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,688
__init__.py
Leaf-0010_cell_detection/utils/__init__.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ utils/initialization """ def notebook_init(verbose=True): # Check system software and hardware print('Checking setup...') import os import shutil from utils.general import check_requirements, emojis, is_colab from utils.torch_ut...
1,093
Python
.py
28
32.178571
114
0.635844
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,689
benchmarks.py
Leaf-0010_cell_detection/utils/benchmarks.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Run YOLOv5 benchmarks on all supported export formats Format | `export.py --include` | Model --- | --- | --- PyTorch | - | yolov5s.pt TorchScr...
6,325
Python
.py
127
43.661417
120
0.589121
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,690
loss.py
Leaf-0010_cell_detection/utils/loss.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Loss functions """ import torch import torch.nn as nn from utils.metrics import bbox_iou from utils.torch_utils import de_parallel def smooth_BCE(eps=0.1): # https://github.com/ultralytics/yolov3/issues/238#issuecomment-598028441 # return positive, negative lab...
9,919
Python
.py
192
40.567708
119
0.543624
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,691
activations.py
Leaf-0010_cell_detection/utils/activations.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Activation functions """ import torch import torch.nn as nn import torch.nn.functional as F class SiLU(nn.Module): # SiLU activation https://arxiv.org/pdf/1606.08415.pdf @staticmethod def forward(x): return x * torch.sigmoid(x) class Hardswish(n...
3,449
Python
.py
80
36.275
106
0.615362
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,692
autobatch.py
Leaf-0010_cell_detection/utils/autobatch.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Auto-batch utils """ from copy import deepcopy import numpy as np import torch from utils.general import LOGGER, colorstr, emojis from utils.torch_utils import profile def check_train_batch_size(model, imgsz=640, amp=True): # Check YOLOv5 training batch size ...
2,600
Python
.py
54
43
121
0.656669
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,693
callbacks.py
Leaf-0010_cell_detection/utils/callbacks.py
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Callback utils """ class Callbacks: """" Handles all registered callbacks for YOLOv5 Hooks """ def __init__(self): # Define the available callbacks self._callbacks = { 'on_pretrain_routine_start': [], 'on_pretra...
2,402
Python
.py
60
30.183333
97
0.559417
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,694
metrics.cpython-37.pyc
Leaf-0010_cell_detection/utils/__pycache__/metrics.cpython-37.pyc
B %ªd8ã@sÆdZddlZddlZddlmZddlmZddlZ ddl Z dd„Z d'dd„Z d(d d„Z dd„ZGdd„dƒZd)dd„Zdd„Zdd„Zd*dd„Zdd„Zedƒd fd d!„Zed"ƒd d#d$fd%d&„ZdS)+z Model validation metrics éN)ÚPathcCs*ddddg...
11,387
Python
.py
118
93.288136
496
0.40213
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,695
__init__.cpython-37.pyc
Leaf-0010_cell_detection/utils/__pycache__/__init__.cpython-37.pyc
B *ªdEã@sdZddd„ZdS)z utils/initialization Tc Csğtdƒddl}ddl}ddlm}m}m}ddlm}|dƒddl }ddl m }|ƒrh|j ddd �|rÌd } |  ¡j} | d ¡\} } } | ¡d | ¡›d | | d›d| | | d›d | | d›d� }nd}...
1,065
Python
.py
11
95.727273
441
0.480569
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,696
augmentations.cpython-37.pyc
Leaf-0010_cell_detection/utils/__pycache__/augmentations.cpython-37.pyc
B )ªd†.ã@s´dZddlZddlZddlZddlZddlmZmZm Z m Z m Z ddl m Z Gdd„dƒZd'dd „Zd(d d „Zdd„Zd)dd„Zd*dd„Zd+dd„Zd,dd„Zd d!„Zd-d%d&„ZdS).z Image augmentation functions éN)ÚLOGGERÚ check_versionÚcolorstrÚresample_segmentsÚ se...
9,107
Python
.py
91
98.989011
902
0.373184
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,697
autoanchor.cpython-37.pyc
Leaf-0010_cell_detection/utils/__pycache__/autoanchor.cpython-37.pyc
B )ªdã@sldZddlZddlZddlZddlZddlmZddlmZm Z m Z e dƒZ dd„Z dd d „Z ddd„ZdS)z AutoAnchor utils éN)Útqdm)ÚLOGGERÚcolorstrÚemojisz AutoAnchor: cCsz|j d¡ d¡ d¡}|d|d}|jd|jd}|rv|...
6,550
Python
.py
57
111.578947
612
0.442527
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,698
downloads.cpython-39.pyc
Leaf-0010_cell_detection/utils/__pycache__/downloads.cpython-39.pyc
a (ªdÇã@sšdZddlZddlZddlZddlZddlZddlZddlmZddl m Z ddl Z ddl Z dd„Z ddd „Zdd d „Zddd„Zddd„Zddd„ZdS)z Download utils éN)ÚPath)ÚZipFilecCs8ztj |¡}| ¡dkWStjjy2Y...
5,045
Python
.py
51
97.882353
562
0.463063
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)
2,283,699
callbacks.cpython-37.pyc
Leaf-0010_cell_detection/utils/__pycache__/callbacks.cpython-37.pyc
B ,Å­bb ã@sdZGdd„dƒZdS)z Callback utils c@s4eZdZdZdd„Zd dd„Zd dd „Zd d „ZdS)Ú Callbacksz<" Handles all registered callbacks for YOLOv5 Hooks cCs8gggggggggggggggggggdœ|_d|_dS)...
2,508
Python
.py
31
74.354839
351
0.543469
Leaf-0010/cell_detection
8
0
0
GPL-3.0
9/5/2024, 10:47:27 PM (Europe/Amsterdam)