Remove `/weights` directory (#3659)
Browse files* Remove `/weights` directory
* cleanup
- .github/workflows/ci-testing.yml +5 -5
- Dockerfile +0 -3
- {weights → data/scripts}/download_weights.sh +0 -0
- detect.py +2 -2
.github/workflows/ci-testing.yml
CHANGED
@@ -64,15 +64,15 @@ jobs:
|
|
64 |
di=cpu # inference devices # define device
|
65 |
|
66 |
# train
|
67 |
-
python train.py --img 128 --batch 16 --weights
|
68 |
# detect
|
69 |
-
python detect.py --weights
|
70 |
python detect.py --weights runs/train/exp/weights/last.pt --device $di
|
71 |
# test
|
72 |
-
python test.py --img 128 --batch 16 --weights
|
73 |
python test.py --img 128 --batch 16 --weights runs/train/exp/weights/last.pt --device $di
|
74 |
|
75 |
python hubconf.py # hub
|
76 |
-
python models/yolo.py --cfg
|
77 |
-
python models/export.py --img 128 --batch 1 --weights
|
78 |
shell: bash
|
|
|
64 |
di=cpu # inference devices # define device
|
65 |
|
66 |
# train
|
67 |
+
python train.py --img 128 --batch 16 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $di
|
68 |
# detect
|
69 |
+
python detect.py --weights ${{ matrix.model }}.pt --device $di
|
70 |
python detect.py --weights runs/train/exp/weights/last.pt --device $di
|
71 |
# test
|
72 |
+
python test.py --img 128 --batch 16 --weights ${{ matrix.model }}.pt --device $di
|
73 |
python test.py --img 128 --batch 16 --weights runs/train/exp/weights/last.pt --device $di
|
74 |
|
75 |
python hubconf.py # hub
|
76 |
+
python models/yolo.py --cfg ${{ matrix.model }}.yaml # inspect
|
77 |
+
python models/export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt # export
|
78 |
shell: bash
|
Dockerfile
CHANGED
@@ -46,8 +46,5 @@ ENV HOME=/usr/src/app
|
|
46 |
# Bash into stopped container
|
47 |
# id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
|
48 |
|
49 |
-
# Send weights to GCP
|
50 |
-
# python -c "from utils.general import *; strip_optimizer('runs/train/exp0_*/weights/best.pt', 'tmp.pt')" && gsutil cp tmp.pt gs://*.pt
|
51 |
-
|
52 |
# Clean up
|
53 |
# docker system prune -a --volumes
|
|
|
46 |
# Bash into stopped container
|
47 |
# id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
|
48 |
|
|
|
|
|
|
|
49 |
# Clean up
|
50 |
# docker system prune -a --volumes
|
{weights → data/scripts}/download_weights.sh
RENAMED
File without changes
|
detect.py
CHANGED
@@ -63,8 +63,8 @@ def detect(weights='yolov5s.pt', # model.pt path(s)
|
|
63 |
# Second-stage classifier
|
64 |
classify = False
|
65 |
if classify:
|
66 |
-
modelc = load_classifier(name='
|
67 |
-
modelc.load_state_dict(torch.load('
|
68 |
|
69 |
# Set Dataloader
|
70 |
vid_path, vid_writer = None, None
|
|
|
63 |
# Second-stage classifier
|
64 |
classify = False
|
65 |
if classify:
|
66 |
+
modelc = load_classifier(name='resnet50', n=2) # initialize
|
67 |
+
modelc.load_state_dict(torch.load('resnet50.pt', map_location=device)['model']).to(device).eval()
|
68 |
|
69 |
# Set Dataloader
|
70 |
vid_path, vid_writer = None, None
|