• 大小: 28.65MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-28
  • 语言: Python
  • 标签:

资源简介

“用于物体跟踪的全卷积连体网络 - SiameseFC”的Pytorch实现

资源截图

代码片段和文件信息

#!/usr/bin/env python3
import argparse
import logging
from os.path import dirname abspath join isfile

import numpy as np
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm

import training.optim as optimz
from training.summary_utils import SummaryMaker
from training import train_utils
from training.datasets import ImageNetVID ImageNetVID_val
from training.labels import create_BCELogit_loss_label
import training.models as mdl
import training.losses as losses
import training.metrics as met
from training.train_utils import RunningAverage
from utils.profiling import Timer
from utils.exceptions import IncompleteArgument
import utils.image_utils as imutils

device = torch.device(“cuda“) if torch.cuda.is_available() \
    else torch.device(“cpu“)


def parse_arguments():
    parser = argparse.ArgumentParser(description=“Training script“)
    parser.add_argument(‘-m‘ ‘--mode‘ default=‘train‘ choices=[‘train‘ ‘eval‘]
                        help=“The mode of execution of the script. Options are “
                        “‘train‘ to train a model and ‘eval‘ to evaluate a model “
                        “on the ImageNet eval dataset.“)
    parser.add_argument(‘-d‘ ‘--data_dir‘ default=‘/home/ml2/workspace_rafael/dummy_Imagenet‘
                        help=“Full path to the directory containing the dataset“)
    parser.add_argument(‘-e‘ ‘--exp_name‘ default=‘default‘
                        help=“The name of the experiment folder that contains the “
                             “parameters checkpoints and logs. Must be in “
                             “training/experiments“)
    parser.add_argument(‘-r‘ ‘--restore_file‘ default=None
                        help=“Optional name of file to restore from (without its“
                             “extension .pth.tar)“)
    parser.add_argument(“-t“ “--timer“ action=“store_true“ dest=“timer“
                        default=False help=“Writes the elapsed time for some “
                                            “sections of code on the log“)
    parser.add_argument(“-j“ “--num_workers“ dest=“num_workers“ type=int
                        default=4 help=“The number of workers for the dataloaders“
                                        “ i.e. the number of additional“
                                        “ dedicated threads to dataloading.“)
    parser.add_argument(‘-f‘ ‘--imutils_flag‘ default=‘fast‘ type=str
                        choices=imutils.VALID_FLAGS
                        help=“Optional the flag of the image_utils defining “
                        “the image processing tools.“)
    parser.add_argument(‘-s‘ ‘--summary_samples‘ default=5 type=int
                        help=“Optional the number of pairs the TensorboardX “
                        “samples during validation to write in the summary. “
                        “For each epoch it saves the ref and the search “
                        “embeddings as well as the final corre

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-06-19 20:33  Pytorch-SiamFC-master\
     文件         245  2019-06-19 20:33  Pytorch-SiamFC-master\.gitignore
     文件    15610824  2019-06-19 20:33  Pytorch-SiamFC-master\baselinePretrained.pth.tar
     文件        1165  2019-06-19 20:33  Pytorch-SiamFC-master\LICENSE
     文件       19073  2019-06-19 20:33  Pytorch-SiamFC-master\README.md
     目录           0  2019-06-19 20:33  Pytorch-SiamFC-master\appSiamFC\
     文件        2479  2019-06-19 20:33  Pytorch-SiamFC-master\appSiamFC\app_utils.py
     文件        8001  2019-06-19 20:33  Pytorch-SiamFC-master\appSiamFC\display.py
     文件       11169  2019-06-19 20:33  Pytorch-SiamFC-master\appSiamFC\producer.py
     文件        3844  2019-06-19 20:33  Pytorch-SiamFC-master\environment.yaml
     目录           0  2019-06-19 20:33  Pytorch-SiamFC-master\images\
     文件      117810  2019-06-19 20:33  Pytorch-SiamFC-master\images\catpair.png
     文件     1676299  2019-06-19 20:33  Pytorch-SiamFC-master\images\correlation_better.gif
     文件        5033  2019-06-19 20:33  Pytorch-SiamFC-master\images\first_line.png
     文件      369269  2019-06-19 20:33  Pytorch-SiamFC-master\images\pairs.png
     文件      661968  2019-06-19 20:33  Pytorch-SiamFC-master\images\quick_train_screen.gif
     文件       88726  2019-06-19 20:33  Pytorch-SiamFC-master\images\results_train.png
     文件       77371  2019-06-19 20:33  Pytorch-SiamFC-master\images\scalars.png
     文件      163985  2019-06-19 20:33  Pytorch-SiamFC-master\images\schema.png
     文件      385734  2019-06-19 20:33  Pytorch-SiamFC-master\images\second_line.png
     文件       18416  2019-06-19 20:33  Pytorch-SiamFC-master\images\third_line.png
     文件      126965  2019-06-19 20:33  Pytorch-SiamFC-master\images\train_screen.png
     文件    11857023  2019-06-19 20:33  Pytorch-SiamFC-master\images\viz_app.gif
     文件        1172  2019-06-19 20:33  Pytorch-SiamFC-master\profile_script.sh
     文件         534  2019-06-19 20:33  Pytorch-SiamFC-master\setup.sh
     文件       25689  2019-06-19 20:33  Pytorch-SiamFC-master\train.py
     目录           0  2019-06-19 20:33  Pytorch-SiamFC-master\training\
     文件        5627  2019-06-19 20:33  Pytorch-SiamFC-master\training\crops_train.py
     文件       23123  2019-06-19 20:33  Pytorch-SiamFC-master\training\datasets.py
     目录           0  2019-06-19 20:33  Pytorch-SiamFC-master\training\experiments\
     目录           0  2019-06-19 20:33  Pytorch-SiamFC-master\training\experiments\default\
............此处省略23个文件信息

评论

共有 条评论