Skip to content

Commit

Permalink
Rename to Linnaeus
Browse files Browse the repository at this point in the history
  • Loading branch information
DTheLegend committed Feb 10, 2023
1 parent c5c1e1b commit e138681
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 54 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions cli/fcos/__main__.py → cli/linnaeus/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pathlib

parser = argparse.ArgumentParser(
prog="FCOS Command Line Tool",
prog="Linnaeus Command Line Tool",
description="This tool provides an easy interface for fcos training and running",
epilog="<Insert famous quote here>"
)
Expand Down Expand Up @@ -33,14 +33,14 @@

if args.command == "train":
try:
from fcos.train import train
from linnaeus.train import train
del args.command

train(**vars(args))
except ImportError:
print("Train Module not included.")
elif args.command == "predict":
from fcos.cli import predict
from linnaeus.cli import predict
del args.command

predict.main(**vars(args))
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions cli/fcos/cli/predict.py → cli/linnaeus/cli/predict.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fcos.core.models import FCOS
from fcos.core.loaders import ClassLoader
from fcos.core.data_augmentation import preprocessing
from fcos.core.mAP.functions import fcos_to_boxes
from linnaeus.core.models import FCOS
from linnaeus.core.loaders import ClassLoader
from linnaeus.core.data_augmentation import preprocessing
from linnaeus.core.mAP.functions import fcos_to_boxes
import numpy as np
import torch
import cv2
Expand Down
8 changes: 4 additions & 4 deletions cli/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[tool.poetry]
name = "fcos-cli"
name = "linnaeus-cli"
version = "0.1.0"
description = ""
authors = ["DTheLegend <[email protected]>"]
readme = "README.md"
packages = [{include = "fcos"}]
packages = [{include = "linnaeus"}]

[tool.poetry.dependencies]
python = "3.10.6"
fcos-core = {path = "../core"}
fcos-train = {path = "../train", optional=true}
linnaeus-core = {path = "../core"}
linnaeus-train = {path = "../train", optional=true}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.extras]
train = ["fcos-train"]
train = ["linnaeus-train"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from torch.utils.data import Dataset
from pathlib import Path

from fcos.core.data_augmentation import preprocessing
from linnaeus.core.data_augmentation import preprocessing

class FolderDataSetLoader(Dataset):

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def return_mAP(model, dataset, classes):
col = cuda_image.shape[3]
confs, locs, centers = model(cuda_image)
boxes = fcos_to_boxes(classes, confs, locs, centers, row, col)
boxes.sort(key=take2, reverse=True)
for gt_box in tags:
box_class = classes[int(gt_box[0].item())]
gt_count_all[box_class] += 1
Expand All @@ -152,6 +153,7 @@ def return_mAP(model, dataset, classes):
mp = 0
mr = 0
for c in classes:
mAP_all[c].sort(key=take2, reverse=True)
p, r, ap = compute_mAP(mAP_all[c], gt_count_all[c])
mAP += ap * gt_count_all[c]
mp += p * gt_count_all[c]
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tool.poetry]
name = "fcos-core"
name = "linnaeus-core"
version = "0.1.7"
description = ""
authors = ["DTheLegend <[email protected]>"]
readme = "README.md"
packages = [{include = "fcos"}]
packages = [{include = "linnaeus"}]

[tool.poetry.dependencies]
python = "3.10.6"
Expand Down
42 changes: 21 additions & 21 deletions main/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions main/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[tool.poetry]
name = "fcos"
name = "linnaeus"
version = "0.1.0"
description = ""
authors = ["DTheLegend <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "3.10.6"
fcos-core = {path = "../core"}
fcos-cli = {path = "../cli", optional=true}
fcos-train = {path = "../train", optional=true}
linnaeus-core = {path = "../core"}
linnaeus-cli = {path = "../cli", optional=true}
linnaeus-train = {path = "../train", optional=true}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.extras]
cli = ["fcos-cli"]
train = ["fcos-train"]
cli = ["linnaeus-cli"]
train = ["linnaeus-train"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import torch
import torch.nn as nn
from fcos.core.mAP import MapMaster
from linnaeus.core.mAP import MapMaster
from .iou_loss import IOULoss

class FCOSLoss(nn.Module):
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions train/fcos/train/train.py → train/linnaeus/train/train.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import torch
from fcos.core.loaders import FolderDataSetLoader, ClassLoader
from fcos.train.loss import FCOSLoss
from fcos.core.models import FCOS
from linnaeus.core.loaders import FolderDataSetLoader, ClassLoader
from linnaeus.train.loss import FCOSLoss
from linnaeus.core.models import FCOS
import torch.utils.data as Data
import os
from fcos.core.mAP import return_mAP
Expand Down
2 changes: 1 addition & 1 deletion train/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions train/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "fcos-train"
name = "linnaeus-train"
version = "0.1.7"
description = ""
authors = ["DTheLegend <[email protected]>"]
readme = "README.md"
packages = [{include = "fcos"}]
packages = [{include = "linnaeus"}]

[tool.poetry.dependencies]
python = "3.10.6"
fcos-core= {path = "../core"}
linnaeus-core= {path = "../core"}
tqdm = "^4.64.1"


Expand Down

0 comments on commit e138681

Please sign in to comment.