KhangTruong commited on
Commit
d7c3e62
·
1 Parent(s): 66b6794

Update weight

Browse files
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. .gitignore +1 -0
  3. mmrotate +1 -0
  4. readme.md +76 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.json filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+
mmrotate ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit d50ab767fd0a6852e7931ac8e3a759f9605d659a
readme.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Vision transformer - RVSA for object detection
3
+
4
+ ## Table of Contents
5
+
6
+ - [Features](#Features)
7
+ - [Getting Started](#getting-started)
8
+ - [Prerequisites](#prerequisites)
9
+ - [Installation](#installation)
10
+
11
+ ## Features
12
+
13
+ Load object detection model - remote sensing image.
14
+
15
+ * Visualize
16
+
17
+ ## Getting Started
18
+
19
+ Below is the list of dependencies and steps to use the repository
20
+
21
+ ### Prerequisites
22
+
23
+ List any software or libraries that are required to run your project.
24
+
25
+ * Python 3
26
+ * mmcv
27
+ * mmrotate
28
+ * torch
29
+ * mmdetection
30
+
31
+ ### Installation
32
+
33
+ Step-by-step instructions on how to install your project.
34
+
35
+ 1. Install environment:
36
+ - Install torch
37
+ * CPU:
38
+ ```
39
+ pip install -q torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cpu
40
+ pip install -q mmcv==2.0.1 -f https://download.openmmlab.com/mmcv/dist/cpu/torch2.0/index.html
41
+ ```
42
+ * GPU:
43
+ ```
44
+ pip install -q torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
45
+ pip install -q mmcv==2.0.1 -f https://download.openmmlab.com/mmcv/dist/cu117/torch2.0/index.html
46
+ ```
47
+
48
+ - Install other dependencies:
49
+
50
+ ```
51
+ pip install -q "mmdet>=3.0.0rc6,<3.1.0"
52
+ git clone https://github.com/open-mmlab/mmrotate -b 1.x
53
+ cd mmrotate
54
+ pip install -q -e .
55
+ cd ..
56
+ git clone https://github.com/ViTAE-Transformer/MTP
57
+ cp -r ./MTP/RS_Tasks_Finetune/Rotated_Detection/mmrotate1.x/mmrotate/* ./mmrotate/mmrotate
58
+ git clone https://huggingface.co/datasets/KhangTruong/NWPU-Caption
59
+ tar -xf NWPU-Caption/02_NWPU_RESISC45.tar
60
+ tar -xf NWPU-Caption/02_NWPU_caption.tar
61
+ mv 02_NWPU_RESISC45 data
62
+ mv 02_NWPU_caption data
63
+ python install.py --root .
64
+ ```
65
+
66
+ 2. Change the directory to *mmrotate*, which is inside the current working directory
67
+ ```
68
+ cd mmrotate
69
+ ```
70
+
71
+ 3. Run the inference
72
+ ```
73
+ python ../extract_feature.py -n ../data/airplane/airplane_002.jpg
74
+ ```
75
+
76
+ 4. It will produce an image in *vis_data*, which is the labelled image.