You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update readme to use ibpc
0.0.3 is now on pip
* Clean up ibpc_py README.md
Signed-off-by: Tully Foote <[email protected]>
* add forward references to the build instructions
* restructure for clarity
* tip about cuda
* typos from internal review
* fix list
---------
Signed-off-by: Tully Foote <[email protected]>
@@ -49,44 +49,183 @@ To simplify the evaluation process, Dockerfiles are provided to generate contain
49
49
50
50
Participants are expected to modify the estimator code to implement their solution. Once completed, your custom estimator should be containerized using Docker and submitted according to the challenge requirements. More detailed submission instructions will be provided soon.
51
51
52
-
## Requirements
52
+
53
+
## Validation Setup
54
+
55
+
### Requirements
53
56
54
57
-[Docker](https://docs.docker.com/)
55
-
-[rocker](https://github.com/osrf/rocker)
58
+
* Docker installed with their user in docker group for passwordless invocations.
59
+
- 7z -- `apt install 7zip`
60
+
- Python3 with virtualenv -- `apt install python3-virtualenv`
56
61
57
62
> Note: Participants are expected to submit Docker containers, so all development workflows are designed with this in mind.
58
63
59
-
## Setup
64
+
65
+
This section will guide you through validating your image.
66
+
67
+
#### Setup a workspace
68
+
```
69
+
mkdir -p ~/bpc_ws
70
+
```
71
+
72
+
#### Create a virtual environment
73
+
74
+
📄 If you're already working in some form of virtualenv you can continue to use that and install `bpc` in that instead of making a new one.
75
+
76
+
```
77
+
python3 -m venv ~/bpc_ws/bpc_env
78
+
```
79
+
80
+
#### Activate that virtual env
81
+
82
+
```
83
+
source ~/bpc_ws/bpc_env/bin/activate
84
+
```
85
+
86
+
**For any new shell interacting with the `bpc` command you will have to rerun this source command.**
87
+
88
+
#### Install bpc
89
+
```
90
+
pip install ibpc
91
+
```
92
+
60
93
61
94
95
+
### Fetch the dataset
96
+
97
+
```
98
+
cd ~/bpc_ws
99
+
bpc fetch ipd
100
+
```
101
+
102
+
### Run the test
103
+
104
+
The test will validate your provided image against the test dataset.
105
+
When you build a new image you rerun this test.
106
+
107
+
**At the moment the published tester is not available.
108
+
You will have to build it locally see below in Development to build `ibpc:tester` and pass `--tester-image ibpc:tester` as additional arguments.
109
+
The default is `ghcr.io/opencv/bpc/estimator-tester:latest` but that's currently unavailable.
110
+
111
+
```
112
+
bpc test <POSE_ESTIMATOR_DOCKER_TAG> ipd
113
+
```
114
+
115
+
For example:
116
+
117
+
```
118
+
bpc test ghcr.io/opencv/bpc/estimator-example:latest ipd
119
+
```
120
+
**Substitute your own estimator image for ghcr.io/opencv/bpc/estimator-example:latest it's not currently available.**
121
+
If you follow the development build below the argument is `ibpc:pose_estimator`.
122
+
123
+
The console output will show the system getting started and then the output of the estimator.
124
+
125
+
If you would like to interact with the estimator and run alternative commands or anything else in the container you can invoke it with `--debug`
126
+
127
+
The tester console output will be streamed to the file `ibpc_test_output.log` Use this to see it
128
+
129
+
```
130
+
tail -f ibpc_test_output.log
131
+
```
132
+
133
+
The results will come out as `submission.csv` when the tester is complete.
134
+
135
+
136
+
## Pose Estimator Development
137
+
138
+
Above you've learned how to validate a system.
139
+
It's time to learn how to create your own Pose Estimator.
140
+
141
+
### Fetch the source repository
142
+
62
143
```bash
63
144
mkdir -p ~/ws_bpc/src
64
145
cd~/ws_bpc/src
65
146
git clone https://github.com/opencv/bpc.git
66
147
```
67
148
68
-
## Build
69
-
70
149
### Build the ibpc_pose_estimator
71
150
151
+
We will use the following example pose estimator for the demo.
If you use this tag the `bpc` invocation will be as follows where you use the image you just built:
162
+
163
+
`bpc test bpc_pose_estimator:example ipd`
164
+
165
+
166
+
👷 At this point it is up to you to fork and fill in the implementation of the pose estimator. 👷
167
+
168
+
### Tips
169
+
170
+
🐌 **If you are iterating a lot of times with the validation and are frustrated by how long the cuda installation is, you can add it to your Dockerfile as below.**
171
+
It will make the image significantly larger, but faster to iterate if you put it higher in the dockerfile. We can't include it in the published image because the image gets too big for hosting and pulling easily.
172
+
173
+
```
174
+
RUN apt-get update && apt-get install -y --no-install-recommends \
We provide a simple baseline solution as a reference for implementing the solution in `ibpc_pose_estimator_py`. Please refer to the [baseline_solution](https://github.com/opencv/bpc/tree/baseline_solution) branch and follow the instructions there.
191
+
192
+
193
+
## Further Details
194
+
195
+
The above is enough to get you going.
196
+
However we want to be open about what else were doing.
197
+
You can see the source of the tester and build your own version as follows if you'd like.
198
+
80
199
### Build the ibpc_tester
81
200
201
+
If you want to reproduce the tester image run the following command
202
+
203
+
204
+
This is packaged and built via a github action to `ghcr.io/opencv/bpc/estimator-tester:latest` however this is how to reproduce it.
205
+
82
206
```bash
83
207
cd~/ws_bpc/src/bpc
84
-
docker buildx build -t ibpc:tester \
208
+
docker buildx build -t bpc_tester:latest \
85
209
--file ./Dockerfile.tester \
86
210
.
87
211
```
88
212
89
-
## Run
213
+
And then when you invoke `bpc test` append the argument `--tester-image bpc_tester:latest` to use your local build.
214
+
215
+
### If you would like the training data
216
+
217
+
Use the command:
218
+
```
219
+
bpc fetch ipd_all
220
+
```
221
+
222
+
223
+
### Manually Run components
224
+
225
+
It is possible to manually run the components.
226
+
`bpc` shows what it is running on the console output.
We provide a simple baseline solution as a reference for implementing the solution in `ibpc_pose_estimator_py`. Please refer to the [baseline_solution](https://github.com/opencv/bpc/tree/baseline_solution) branch and follow the instructions there.
114
-
115
-
## Next Steps
116
-
117
-
Stay tuned – more detailed submission instructions and guidelines will be provided soon.
0 commit comments