-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix patch_off_object
#114
Fix patch_off_object
#114
Changes from all commits
4a92419
8d890df
1dd7155
6640b6b
076b674
b5ce9bd
a7c3e5e
c9ed4f4
c2aaf3b
f409539
8b13932
a0378d5
c5871c6
0d33c11
a0716b6
9e7f4f3
4fcc858
8ad068b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
Experiment,% Correct,% Used MLH,Num Matching Steps,Rotation Error (radians),Run Time,Episode Run Time (s) | ||
base_config_10distinctobj_dist_agent,98.57%,5.71%,36,0.31,12m,31s | ||
base_config_10distinctobj_surf_agent,100.00%,0.00%,28,0.17,6m,27s | ||
randrot_noise_10distinctobj_dist_agent,99.00%,7.00%,51,0.50,10m,56s | ||
randrot_noise_10distinctobj_dist_on_distm,99.00%,1.00%,35,0.26,7m,48s | ||
randrot_noise_10distinctobj_surf_agent,100.00%,1.00%,29,0.36,7m,49s | ||
randrot_10distinctobj_surf_agent,100.00%,0.00%,29,0.37,4m,29s | ||
randrot_noise_10distinctobj_5lms_dist_agent,100.00%,3.00%,52,0.88,21m,139s | ||
base_10simobj_surf_agent,95.00%,10.00%,84,0.21,14m,76s | ||
randrot_noise_10simobj_dist_agent,81.00%,38.00%,193,0.52,26m,206s | ||
randrot_noise_10simobj_surf_agent,90.00%,35.00%,178,0.45,34m,294s | ||
randomrot_rawnoise_10distinctobj_surf_agent,65.00%,77.00%,16,1.60,22m,24s | ||
base_10multi_distinctobj_dist_agent,74.29%,37.14%,27,0.64,1h9m,2s | ||
base_config_10distinctobj_dist_agent,99.29%,5.71%,36,0.31,10m,31s | ||
base_config_10distinctobj_surf_agent,100.00%,0.00%,28,0.21,6m,28s | ||
randrot_noise_10distinctobj_dist_agent,98.00%,7.00%,46,0.50,9m,55s | ||
randrot_noise_10distinctobj_dist_on_distm,99.00%,3.00%,35,0.26,7m,50s | ||
randrot_noise_10distinctobj_surf_agent,100.00%,0.00%,31,0.34,8m,62s | ||
randrot_10distinctobj_surf_agent,100.00%,0.00%,28,0.40,7m,50s | ||
randrot_noise_10distinctobj_5lms_dist_agent,100.00%,7.00%,50,0.94,44m,189s | ||
base_10simobj_surf_agent,95.71%,10.71%,82,0.21,18m,104s | ||
randrot_noise_10simobj_dist_agent,82.00%,37.00%,185,0.52,26m,202s | ||
randrot_noise_10simobj_surf_agent,89.00%,34.00%,183,0.47,35m,307s | ||
randomrot_rawnoise_10distinctobj_surf_agent,68.00%,81.00%,15,1.72,22m,23s | ||
base_10multi_distinctobj_dist_agent,72.86%,43.57%,23,0.75,1h12m,1s |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Experiment,% Correct,% Used MLH,Num Matching Steps,Rotation Error (radians),Run Time,Episode Run Time (s) | ||
base_77obj_dist_agent,93.51%,14.29%,90,0.31,1h37m,295s | ||
base_77obj_surf_agent,98.27%,5.63%,57,0.21,46m,141s | ||
randrot_noise_77obj_dist_agent,87.01%,28.57%,155,0.64,2h14m,479s | ||
randrot_noise_77obj_surf_agent,94.93%,19.48%,102,0.62,1h23m,304s | ||
randrot_noise_77obj_5lms_dist_agent,93.51%,3.90%,71,0.92,54m,1398s | ||
base_77obj_dist_agent,92.21%,16.02%,88,0.30,1h38m,301s | ||
base_77obj_surf_agent,98.27%,4.33%,52,0.18,42m,123s | ||
randrot_noise_77obj_dist_agent,87.01%,29.00%,151,0.63,2h10m,468s | ||
randrot_noise_77obj_surf_agent,94.37%,21.65%,113,0.61,1h31m,339s | ||
randrot_noise_77obj_5lms_dist_agent,90.91%,5.19%,70,1.01,1h7m,1439s |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,6 +366,12 @@ def reset(self): | |
self.symmetry_evidence = 0 | ||
self.last_possible_hypotheses = None | ||
|
||
self.current_mlh["graph_id"] = "no_observations_yet" | ||
self.current_mlh["location"] = [0, 0, 0] | ||
self.current_mlh["rotation"] = Rotation.from_euler("xyz", [0, 0, 0]) | ||
self.current_mlh["scale"] = 1 | ||
self.current_mlh["evidence"] = 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wha was the reason these needed to be added now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since not resetting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah okay, good catch! |
||
|
||
def receive_votes(self, vote_data): | ||
"""Get evidence count votes and use to update own evidence counts. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -664,8 +664,9 @@ def orient_to_object( | |
|
||
logging.debug("Searching for object") | ||
|
||
# Check if the center of the view finder is on the object | ||
if sem_obs[obs_dim[0] // 2][obs_dim[1] // 2] == target_semantic_id: | ||
# Check if the central pixel is on-object. | ||
y_mid, x_mid = obs_dim[0] // 2, obs_dim[1] // 2 | ||
if sem_obs[y_mid, x_mid] == target_semantic_id: | ||
logging.debug("Already centered on the object") | ||
return [], True | ||
|
||
|
@@ -724,7 +725,7 @@ def find_location_to_look_at(self, sem3d_obs, image_shape, target_semantic_id): | |
# as expected, which can otherwise break if e.g. on_object_image is passed | ||
# as an int or boolean rather than float | ||
smoothed_on_object_image = scipy.ndimage.gaussian_filter( | ||
on_object_image, sem3d_obs.shape[0] / 10, mode="constant" | ||
on_object_image, 2, mode="constant" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this number hardcoded now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just landed on a kernel size of 2 because it made the smoothed images look "reasonably" smooth, and solved the issue with holes on the object. I can see why we would want to kernel size to scale with the resolution, but then I thought what we really want to scale it by is the physical size on the object between pixels since presumably holes in the object are usually pretty small (in centimeters). This is something I can come back to, but I just left it since it seemed to be giving a good result when I looked at all the images during debugging. |
||
) | ||
idx_loc_to_look_at = np.argmax(smoothed_on_object_image * on_object_image) | ||
idx_loc_to_look_at = np.unravel_index(idx_loc_to_look_at, on_object_image.shape) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an idea why performance is worse now in terms of % correct and % used mlh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping to come up with a good answer for this, but ultimately I don't really know. I reran with a handful of different random seeds, sometimes recovering the roughly the same accuracy as before. Somehow the very slightly different starting conditions ended up having a noticeable change on accuracy, but I don't have much to say beyond that. It's something I'd like to investigate further in the near future. I'll be redoing all benchmarks for the semantic sensor PR, so maybe there's more I can learn then.