Skip to content

Commit fec4600

Browse files
committed
wip #63
1 parent a1d4173 commit fec4600

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def get_next_photo_index(self):
150150
last_photo_index = 0
151151
for p in self._photos:
152152
try:
153-
index = int(p[len(PHOTO_PREFIX):-len(self._camera.PHOTO_FILE_EXT)])
153+
index = int(p["name"][len(PHOTO_PREFIX):-len(self._camera.PHOTO_FILE_EXT)])
154154
if index > last_photo_index:
155155
last_photo_index = index
156156
except:

coderbot.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"move_tr_speed": "80", "move_fw_elapse": "1", "camera_color_object_size_min": "4000", "camera_path_object_size_min": "4000", "load_at_start": "", "move_tr_elapse": "0.5", "sound_stop": "$shutdown.mp3", "show_control_move_commands": "true", "prog_level": "adv", "prog_scrollbars": "true", "move_fw_speed": "100", "camera_color_object_size_max": "160000", "sound_shutter": "$shutter.mp3", "show_page_prefs": "true", "cv_image_factor": "4", "ctrl_hud_image": "", "button_func": "none", "ctrl_fw_elapse": "-1", "ctrl_tr_elapse": "-1", "move_power_angle_2": "60", "move_power_angle_3": "60", "move_power_angle_1": "45", "move_motor_trim": "1", "cnn_default_model": "apple_kiwi_fast", "show_page_program": "true", "sound_start": "$startup.mp3", "camera_exposure_mode": "auto", "ctrl_tr_speed": "80", "prog_move_mpu": "yes", "ctrl_fw_speed": "100", "camera_refresh_timeout": "0.1", "camera_jpeg_quality": "20", "prog_maxblocks": "-1", "move_motor_mode": "dc", "camera_path_object_size_max": "160000", "show_page_control": "true"}
1+
{"move_tr_speed": "80", "move_fw_elapse": "1", "camera_color_object_size_min": "4000", "camera_path_object_size_min": "4000", "load_at_start": "", "move_tr_elapse": "0.5", "sound_stop": "$shutdown.mp3", "show_control_move_commands": "true", "prog_level": "adv", "prog_scrollbars": "true", "move_fw_speed": "100", "camera_color_object_size_max": "160000", "sound_shutter": "$shutter.mp3", "show_page_prefs": "true", "cv_image_factor": "4", "ctrl_hud_image": "", "button_func": "none", "ctrl_fw_elapse": "-1", "ctrl_tr_elapse": "-1", "move_power_angle_2": "60", "move_power_angle_3": "60", "move_power_angle_1": "45", "move_motor_trim": "1", "cnn_default_model": "apple_kiwi_tomato_fast", "show_page_program": "true", "sound_start": "$startup.mp3", "camera_exposure_mode": "auto", "ctrl_tr_speed": "80", "prog_move_mpu": "yes", "ctrl_fw_speed": "100", "camera_refresh_timeout": "0.1", "camera_jpeg_quality": "20", "prog_maxblocks": "-1", "move_motor_mode": "dc", "camera_path_object_size_max": "160000", "show_page_control": "true"}

photos/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"tag": "", "name": "DSC110.jpg"}, {"tag": "other", "name": "DSC19.jpg"}, {"tag": "other", "name": "DSC111.jpg"}, {"tag": "kiwi", "name": "DSC94.jpg"}, {"tag": "other", "name": "DSC113.jpg"}, {"tag": "other", "name": "DSC118.jpg"}, {"tag": "apple", "name": "DSC60.jpg"}, {"tag": "other", "name": "DSC112.jpg"}, {"tag": "apple", "name": "DSC38.jpg"}, {"tag": "kiwi", "name": "DSC73.jpg"}, {"tag": "apple", "name": "DSC49.jpg"}, {"tag": "other", "name": "DSC24.jpg"}, {"tag": "kiwi", "name": "DSC74.jpg"}, {"tag": "kiwi", "name": "DSC96.jpg"}, {"tag": "kiwi", "name": "DSC97.jpg"}, {"tag": "apple", "name": "DSC48.jpg"}, {"tag": "other", "name": "DSC121.jpg"}, {"tag": "other", "name": "DSC15.jpg"}, {"tag": "other", "name": "DSC3.jpg"}, {"tag": "other", "name": "DSC9.jpg"}, {"tag": "other", "name": "DSC115.jpg"}, {"tag": "apple", "name": "DSC30.jpg"}, {"tag": "other", "name": "DSC22.jpg"}, {"tag": "other", "name": "DSC103.jpg"}, {"tag": "kiwi", "name": "DSC86.jpg"}, {"tag": "apple", "name": "DSC35.jpg"}, {"tag": "apple", "name": "DSC34.jpg"}, {"tag": "other", "name": "DSC100.jpg"}, {"tag": "apple", "name": "DSC29.jpg"}, {"tag": "apple", "name": "DSC61.jpg"}, {"tag": "kiwi", "name": "DSC77.jpg"}, {"tag": "kiwi", "name": "DSC95.jpg"}, {"tag": "kiwi", "name": "DSC93.jpg"}, {"tag": "kiwi", "name": "DSC89.jpg"}, {"tag": "kiwi", "name": "DSC62.jpg"}, {"name": "DSC10.jpg"}, {"tag": "other", "name": "DSC108.jpg"}, {"tag": "kiwi", "name": "DSC80.jpg"}, {"tag": "apple", "name": "DSC65.jpg"}, {"tag": "other", "name": "DSC123.jpg"}, {"tag": "apple", "name": "DSC55.jpg"}, {"tag": "apple", "name": "DSC50.jpg"}, {"name": "DSC4.jpg"}, {"tag": "kiwi", "name": "DSC75.jpg"}, {"tag": "other", "name": "DSC8.jpg"}, {"tag": "kiwi", "name": "DSC85.jpg"}, {"tag": "other", "name": "DSC104.jpg"}, {"tag": "kiwi", "name": "DSC88.jpg"}, {"tag": "apple", "name": "DSC59.jpg"}, {"tag": "apple", "name": "DSC41.jpg"}, {"tag": "other", "name": "DSC13.jpg"}, {"tag": "apple", "name": "DSC40.jpg"}, {"tag": "apple", "name": "DSC37.jpg"}, {"tag": "kiwi", "name": "DSC87.jpg"}, {"tag": "other", "name": "DSC14.jpg"}, {"tag": "apple", "name": "DSC64.jpg"}, {"tag": "other", "name": "DSC12.jpg"}, {"tag": "apple", "name": "DSC57.jpg"}, {"tag": "kiwi", "name": "DSC83.jpg"}, {"tag": "kiwi", "name": "DSC70.jpg"}, {"name": "DSC21.jpg"}, {"name": "DSC98.jpg"}, {"name": "DSC23.jpg"}, {"name": "DSC120.jpg"}, {"name": "DSC99.jpg"}, {"tag": "apple", "name": "DSC46.jpg"}, {"name": "DSC107.jpg"}, {"tag": "apple", "name": "DSC66.jpg"}, {"tag": "apple", "name": "DSC31.jpg"}, {"tag": "apple", "name": "DSC36.jpg"}, {"tag": "apple", "name": "DSC47.jpg"}, {"name": "DSC11.jpg"}, {"name": "DSC76.jpg"}, {"name": "DSC82.jpg"}, {"name": "DSC106.jpg"}, {"name": "DSC56.jpg"}, {"name": "DSC67.jpg"}, {"name": "DSC42.jpg"}, {"name": "DSC45.jpg"}, {"name": "DSC54.jpg"}, {"name": "DSC68.jpg"}, {"name": "DSC5.jpg"}, {"name": "DSC25.jpg"}, {"name": "DSC44.jpg"}, {"name": "DSC81.jpg"}, {"name": "DSC27.jpg"}, {"name": "DSC124.jpg"}, {"name": "DSC114.jpg"}, {"name": "DSC69.jpg"}, {"tag": "kiwi", "name": "DSC72.jpg"}, {"name": "DSC18.jpg"}, {"name": "DSC20.jpg"}, {"name": "DSC63.jpg"}, {"name": "DSC52.jpg"}, {"name": "DSC7.jpg"}, {"tag": "kiwi", "name": "DSC84.jpg"}, {"name": "DSC53.jpg"}, {"name": "DSC102.jpg"}, {"tag": "kiwi", "name": "DSC90.jpg"}, {"name": "DSC109.jpg"}, {"tag": "other", "name": "DSC119.jpg"}, {"name": "DSC6.jpg"}, {"tag": "apple", "name": "DSC33.jpg"}, {"tag": "apple", "name": "DSC32.jpg"}, {"tag": "kiwi", "name": "DSC71.jpg"}, {"tag": "other", "name": "DSC116.jpg"}, {"tag": "apple", "name": "DSC51.jpg"}, {"tag": "other", "name": "DSC101.jpg"}, {"tag": "kiwi", "name": "DSC79.jpg"}, {"tag": "other", "name": "DSC16.jpg"}, {"tag": "other", "name": "DSC28.jpg"}, {"tag": "apple", "name": "DSC26.jpg"}, {"tag": "kiwi", "name": "DSC91.jpg"}, {"tag": "apple", "name": "DSC43.jpg"}, {"tag": "other", "name": "DSC125.jpg"}, {"tag": "kiwi", "name": "DSC92.jpg"}, {"tag": "other", "name": "DSC117.jpg"}, {"tag": "apple", "name": "DSC39.jpg"}, {"tag": "other", "name": "DSC126.jpg"}, {"tag": "other", "name": "DSC17.jpg"}, {"tag": "kiwi", "name": "DSC78.jpg"}, {"tag": "other", "name": "DSC127.jpg"}, {"tag": "other", "name": "DSC122.jpg"}, {"tag": "apple", "name": "DSC58.jpg"}]
1+
[{"tag": "", "name": "DSC110.jpg"}, {"tag": "other", "name": "DSC19.jpg"}, {"tag": "other", "name": "DSC111.jpg"}, {"tag": "kiwi", "name": "DSC94.jpg"}, {"tag": "other", "name": "DSC113.jpg"}, {"tag": "other", "name": "DSC118.jpg"}, {"tag": "apple", "name": "DSC60.jpg"}, {"tag": "other", "name": "DSC112.jpg"}, {"tag": "apple", "name": "DSC38.jpg"}, {"tag": "kiwi", "name": "DSC73.jpg"}, {"tag": "apple", "name": "DSC49.jpg"}, {"tag": "other", "name": "DSC24.jpg"}, {"tag": "kiwi", "name": "DSC74.jpg"}, {"tag": "kiwi", "name": "DSC96.jpg"}, {"tag": "kiwi", "name": "DSC97.jpg"}, {"tag": "apple", "name": "DSC48.jpg"}, {"tag": "other", "name": "DSC121.jpg"}, {"tag": "other", "name": "DSC15.jpg"}, {"tag": "other", "name": "DSC3.jpg"}, {"tag": "other", "name": "DSC9.jpg"}, {"tag": "other", "name": "DSC115.jpg"}, {"tag": "apple", "name": "DSC30.jpg"}, {"tag": "other", "name": "DSC22.jpg"}, {"tag": "other", "name": "DSC103.jpg"}, {"tag": "kiwi", "name": "DSC86.jpg"}, {"tag": "apple", "name": "DSC35.jpg"}, {"tag": "apple", "name": "DSC34.jpg"}, {"tag": "other", "name": "DSC100.jpg"}, {"tag": "apple", "name": "DSC29.jpg"}, {"tag": "apple", "name": "DSC61.jpg"}, {"tag": "kiwi", "name": "DSC77.jpg"}, {"tag": "kiwi", "name": "DSC95.jpg"}, {"tag": "kiwi", "name": "DSC93.jpg"}, {"tag": "kiwi", "name": "DSC89.jpg"}, {"tag": "kiwi", "name": "DSC62.jpg"}, {"name": "DSC10.jpg"}, {"tag": "other", "name": "DSC108.jpg"}, {"tag": "kiwi", "name": "DSC80.jpg"}, {"tag": "apple", "name": "DSC65.jpg"}, {"tag": "other", "name": "DSC123.jpg"}, {"tag": "apple", "name": "DSC55.jpg"}, {"tag": "apple", "name": "DSC50.jpg"}, {"name": "DSC4.jpg"}, {"tag": "kiwi", "name": "DSC75.jpg"}, {"tag": "other", "name": "DSC8.jpg"}, {"tag": "kiwi", "name": "DSC85.jpg"}, {"tag": "other", "name": "DSC104.jpg"}, {"tag": "kiwi", "name": "DSC88.jpg"}, {"tag": "apple", "name": "DSC59.jpg"}, {"tag": "apple", "name": "DSC41.jpg"}, {"tag": "other", "name": "DSC13.jpg"}, {"tag": "apple", "name": "DSC40.jpg"}, {"tag": "apple", "name": "DSC37.jpg"}, {"tag": "kiwi", "name": "DSC87.jpg"}, {"tag": "other", "name": "DSC14.jpg"}, {"tag": "apple", "name": "DSC64.jpg"}, {"tag": "other", "name": "DSC12.jpg"}, {"tag": "apple", "name": "DSC57.jpg"}, {"tag": "kiwi", "name": "DSC83.jpg"}, {"tag": "kiwi", "name": "DSC70.jpg"}, {"name": "DSC21.jpg"}, {"name": "DSC98.jpg"}, {"name": "DSC23.jpg"}, {"name": "DSC120.jpg"}, {"name": "DSC99.jpg"}, {"tag": "apple", "name": "DSC46.jpg"}, {"name": "DSC107.jpg"}, {"tag": "apple", "name": "DSC66.jpg"}, {"tag": "apple", "name": "DSC31.jpg"}, {"tag": "", "name": "DSC36.jpg"}, {"tag": "apple", "name": "DSC47.jpg"}, {"name": "DSC11.jpg"}, {"tag": "kiwi", "name": "DSC76.jpg"}, {"tag": "kiwi", "name": "DSC82.jpg"}, {"name": "DSC106.jpg"}, {"name": "DSC56.jpg"}, {"name": "DSC67.jpg"}, {"name": "DSC42.jpg"}, {"name": "DSC45.jpg"}, {"name": "DSC54.jpg"}, {"name": "DSC68.jpg"}, {"tag": "other", "name": "DSC5.jpg"}, {"tag": "other", "name": "DSC25.jpg"}, {"name": "DSC44.jpg"}, {"tag": "kiwi", "name": "DSC81.jpg"}, {"tag": "apple", "name": "DSC27.jpg"}, {"tag": "other", "name": "DSC124.jpg"}, {"tag": "other", "name": "DSC114.jpg"}, {"name": "DSC69.jpg"}, {"tag": "kiwi", "name": "DSC72.jpg"}, {"tag": "other", "name": "DSC18.jpg"}, {"tag": "other", "name": "DSC20.jpg"}, {"tag": "apple", "name": "DSC63.jpg"}, {"tag": "apple", "name": "DSC52.jpg"}, {"name": "DSC7.jpg"}, {"tag": "kiwi", "name": "DSC84.jpg"}, {"tag": "apple", "name": "DSC53.jpg"}, {"name": "DSC102.jpg"}, {"tag": "kiwi", "name": "DSC90.jpg"}, {"tag": "other", "name": "DSC109.jpg"}, {"tag": "other", "name": "DSC119.jpg"}, {"name": "DSC6.jpg"}, {"tag": "apple", "name": "DSC33.jpg"}, {"tag": "apple", "name": "DSC32.jpg"}, {"tag": "kiwi", "name": "DSC71.jpg"}, {"tag": "other", "name": "DSC116.jpg"}, {"tag": "apple", "name": "DSC51.jpg"}, {"tag": "other", "name": "DSC101.jpg"}, {"tag": "kiwi", "name": "DSC79.jpg"}, {"tag": "other", "name": "DSC16.jpg"}, {"tag": "other", "name": "DSC28.jpg"}, {"tag": "apple", "name": "DSC26.jpg"}, {"tag": "kiwi", "name": "DSC91.jpg"}, {"tag": "apple", "name": "DSC43.jpg"}, {"tag": "other", "name": "DSC125.jpg"}, {"tag": "kiwi", "name": "DSC92.jpg"}, {"tag": "other", "name": "DSC117.jpg"}, {"tag": "apple", "name": "DSC39.jpg"}, {"tag": "other", "name": "DSC126.jpg"}, {"tag": "other", "name": "DSC17.jpg"}, {"tag": "kiwi", "name": "DSC78.jpg"}, {"tag": "other", "name": "DSC127.jpg"}, {"tag": "other", "name": "DSC122.jpg"}, {"tag": "apple", "name": "DSC58.jpg"}, {"tag": "tomato", "name": "DSC128.jpg"}, {"tag": "tomato", "name": "DSC129.jpg"}, {"tag": "tomato", "name": "DSC130.jpg"}, {"tag": "tomato", "name": "DSC131.jpg"}, {"tag": "tomato", "name": "DSC132.jpg"}, {"tag": "tomato", "name": "DSC133.jpg"}, {"tag": "tomato", "name": "DSC134.jpg"}, {"tag": "tomato", "name": "DSC135.jpg"}, {"tag": "tomato", "name": "DSC136.jpg"}, {"tag": "tomato", "name": "DSC137.jpg"}, {"tag": "", "name": "DSC138.jpg"}, {"tag": "", "name": "DSC139.jpg"}, {"tag": "tomato", "name": "DSC140.jpg"}, {"tag": "tomato", "name": "DSC141.jpg"}, {"tag": "tomato", "name": "DSC142.jpg"}, {"tag": "tomato", "name": "DSC143.jpg"}, {"tag": "tomato", "name": "DSC144.jpg"}, {"tag": "tomato", "name": "DSC145.jpg"}, {"tag": "tomato", "name": "DSC146.jpg"}, {"tag": "tomato", "name": "DSC147.jpg"}, {"name": "DSC148.jpg"}, {"tag": "tomato", "name": "DSC149.jpg"}, {"tag": "tomato", "name": "DSC150.jpg"}, {"tag": "tomato", "name": "DSC151.jpg"}, {"tag": "tomato", "name": "DSC152.jpg"}, {"tag": "tomato", "name": "DSC153.jpg"}, {"tag": "tomato", "name": "DSC154.jpg"}, {"name": "DSC155.jpg"}, {"tag": "tomato", "name": "DSC156.jpg"}, {"tag": "tomato", "name": "DSC157.jpg"}]

static/js/control.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,13 @@ $(document).on( "pagecreate", '#page-preferences', function( event ) {
139139
$.get(url='/cnnmodels', success= function(data) {
140140
$('#i_cnn_default_model').empty();
141141
$('#i_cnn_default_model').append('<option></option>');
142+
var def_model = $('#i_cnn_default_model').attr("value");
142143
for(m in data) {
143144
if(Math.trunc(parseInt(data[m].status))==1){
144145
$('#i_cnn_default_model').append('<option value="'+m+'">'+m+'</option>');
145146
}
146147
}
147-
$('#i_cnn_default_model').selectmenu("refresh");
148+
$('#i_cnn_default_model').val(def_model).selectmenu("refresh");
148149

149150
}, dataType="json");
150151
$( "#popup-cnn-models" ).bind({

templates/config.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ <h3>{% trans %}Train new CNN Model{% endtrans %}</h3>
253253
     <option value="mobilenet_0.25_128">MobileNet 0.25 128</option>
254254
</select>
255255
<label for="i_cnn_model_train_steps">{% trans %}Training steps{% endtrans %}</label>
256-
<input type="text" id="i_cnn_train_steps" name="cnn_train_steps" value="50">
256+
<input type="range" id="i_cnn_train_steps" name="cnn_train_steps" min="10" max="100" step="10" value="50">
257257
<label for="i_cnn_learn_rate">{% trans %}Learning rate{% endtrans %}</label>
258-
<input type="text" id="i_cnn_learn_rate" name="cnn_learn_rate" value="0.01">
258+
<input type="range" id="i_cnn_learn_rate" name="cnn_learn_rate" value="0.01" min="0.001" max="0.1" step="0.001">
259259
<button class="ui-btn b_train_new_cnn_model">Train new Model</button>
260260
</form>
261261
</div>

0 commit comments

Comments
 (0)