Spaces:
Runtime error
Runtime error
brunorosilva
commited on
Commit
β’
f1a0ba2
1
Parent(s):
41e1e17
chore: change repo name
Browse files- Makefile +3 -3
- {makeitsports_bot β img2art_search}/__init__.py +0 -0
- {makeitsports_bot β img2art_search}/constants.py +0 -0
- {makeitsports_bot β img2art_search}/data/__init__.py +0 -0
- {makeitsports_bot β img2art_search}/data/data.py +1 -1
- {makeitsports_bot β img2art_search}/data/dataset.py +0 -0
- {makeitsports_bot β img2art_search}/data/transforms.py +0 -0
- {makeitsports_bot β img2art_search}/losses/__init__.py +0 -0
- {makeitsports_bot β img2art_search}/losses/contrastiveloss.py +0 -0
- {makeitsports_bot β img2art_search}/models/__init__.py +0 -0
- {makeitsports_bot β img2art_search}/models/compute_embeddings.py +3 -3
- {makeitsports_bot β img2art_search}/models/model.py +0 -0
- {makeitsports_bot β img2art_search}/models/predict.py +5 -5
- {makeitsports_bot β img2art_search}/models/train.py +5 -5
- {makeitsports_bot β img2art_search}/utils.py +1 -1
- main.py +3 -3
- pyproject.toml +1 -1
- setup.py +2 -2
Makefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
lint:
|
2 |
-
isort
|
3 |
-
black
|
4 |
-
flake8
|
5 |
viz:
|
6 |
poetry run python3 main.py interface
|
7 |
train:
|
|
|
1 |
lint:
|
2 |
+
isort img2art_search
|
3 |
+
black img2art_search
|
4 |
+
flake8 img2art_search
|
5 |
viz:
|
6 |
poetry run python3 main.py interface
|
7 |
train:
|
{makeitsports_bot β img2art_search}/__init__.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/constants.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/data/__init__.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/data/data.py
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
from
|
2 |
import os
|
3 |
import numpy as np
|
4 |
|
|
|
1 |
+
from img2art_search.constants import BASE_PATH
|
2 |
import os
|
3 |
import numpy as np
|
4 |
|
{makeitsports_bot β img2art_search}/data/dataset.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/data/transforms.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/losses/__init__.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/losses/contrastiveloss.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/models/__init__.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/models/compute_embeddings.py
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from
|
3 |
import numpy as np
|
4 |
from sklearn.neighbors import NearestNeighbors
|
5 |
-
from
|
6 |
-
from
|
7 |
from tqdm import tqdm
|
8 |
import os
|
9 |
|
|
|
1 |
import torch
|
2 |
+
from img2art_search.models.model import ViTImageSearchModel
|
3 |
import numpy as np
|
4 |
from sklearn.neighbors import NearestNeighbors
|
5 |
+
from img2art_search.data.dataset import ImageRetrievalDataset
|
6 |
+
from img2art_search.data.transforms import transform
|
7 |
from tqdm import tqdm
|
8 |
import os
|
9 |
|
{makeitsports_bot β img2art_search}/models/model.py
RENAMED
File without changes
|
{makeitsports_bot β img2art_search}/models/predict.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
-
from
|
2 |
-
from
|
3 |
-
from
|
4 |
-
from
|
5 |
-
from
|
6 |
search_image,
|
7 |
create_gallery,
|
8 |
load_fine_tuned_model,
|
|
|
1 |
+
from img2art_search.data.dataset import ImageRetrievalDataset
|
2 |
+
from img2art_search.data.transforms import transform
|
3 |
+
from img2art_search.models.train import fine_tune_vit
|
4 |
+
from img2art_search.utils import inverse_transform_img
|
5 |
+
from img2art_search.models.compute_embeddings import (
|
6 |
search_image,
|
7 |
create_gallery,
|
8 |
load_fine_tuned_model,
|
{makeitsports_bot β img2art_search}/models/train.py
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
-
from
|
2 |
from torch.utils.data import DataLoader
|
3 |
-
from
|
4 |
-
from
|
5 |
-
from
|
6 |
-
from
|
7 |
import torch
|
8 |
from torch.optim import Adam
|
9 |
from torch.utils.tensorboard import SummaryWriter
|
|
|
1 |
+
from img2art_search.data.dataset import ImageRetrievalDataset
|
2 |
from torch.utils.data import DataLoader
|
3 |
+
from img2art_search.losses.contrastiveloss import ContrastiveLoss
|
4 |
+
from img2art_search.data.data import get_data_from_local, split_train_val_test
|
5 |
+
from img2art_search.data.transforms import transform
|
6 |
+
from img2art_search.models.model import ViTImageSearchModel
|
7 |
import torch
|
8 |
from torch.optim import Adam
|
9 |
from torch.utils.tensorboard import SummaryWriter
|
{makeitsports_bot β img2art_search}/utils.py
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
from
|
2 |
|
3 |
|
4 |
def inverse_transform_img(img):
|
|
|
1 |
+
from img2art_search.data.transforms import inversetransform
|
2 |
|
3 |
|
4 |
def inverse_transform_img(img):
|
main.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
from
|
2 |
-
from
|
3 |
-
from
|
4 |
import gradio as gr
|
5 |
import argparse
|
6 |
|
|
|
1 |
+
from img2art_search.models.predict import predict
|
2 |
+
from img2art_search.models.train import fine_tune_vit
|
3 |
+
from img2art_search.models.compute_embeddings import create_gallery_embeddings
|
4 |
import gradio as gr
|
5 |
import argparse
|
6 |
|
pyproject.toml
CHANGED
@@ -4,7 +4,7 @@ version = "0.1.0"
|
|
4 |
description = ""
|
5 |
authors = ["brunorosilva <b.rosilva1@gmail.com>"]
|
6 |
readme = "README.md"
|
7 |
-
packages = [{include = "
|
8 |
|
9 |
[tool.poetry.dependencies]
|
10 |
python = "^3.10"
|
|
|
4 |
description = ""
|
5 |
authors = ["brunorosilva <b.rosilva1@gmail.com>"]
|
6 |
readme = "README.md"
|
7 |
+
packages = [{include = "img2art_search"}]
|
8 |
|
9 |
[tool.poetry.dependencies]
|
10 |
python = "^3.10"
|
setup.py
CHANGED
@@ -19,7 +19,7 @@ requirements = [
|
|
19 |
|
20 |
|
21 |
setup(
|
22 |
-
name="
|
23 |
version="0.0.1",
|
24 |
url="https://github.com/brunorosilva/makeitsports-bot",
|
25 |
author="Bruno Chicelli",
|
@@ -27,7 +27,7 @@ setup(
|
|
27 |
description="Short description",
|
28 |
long_description=read("README.rst"),
|
29 |
packages=find_packages(exclude=("tests",)),
|
30 |
-
entry_points={"console_scripts": ["
|
31 |
install_requires=requirements,
|
32 |
classifiers=[
|
33 |
"Programming Language :: Python",
|
|
|
19 |
|
20 |
|
21 |
setup(
|
22 |
+
name="img2art_search",
|
23 |
version="0.0.1",
|
24 |
url="https://github.com/brunorosilva/makeitsports-bot",
|
25 |
author="Bruno Chicelli",
|
|
|
27 |
description="Short description",
|
28 |
long_description=read("README.rst"),
|
29 |
packages=find_packages(exclude=("tests",)),
|
30 |
+
entry_points={"console_scripts": ["img2art_search=img2art_search.cli:cli"]},
|
31 |
install_requires=requirements,
|
32 |
classifiers=[
|
33 |
"Programming Language :: Python",
|