Search found 76 matches

by chrisPyres66
Thu Apr 04, 2019 6:11 am
Forum: General Topics
Topic: Nvidia digits to train cnn with caffe
Replies: 3
Views: 5115

Re: Nvidia digits to train cnn with caffe

Nice, do you have some advice because i dont manage to quantize to openmv camera with : python2 ~/openmv/ml/cmsisnn/nn_quantizer.py --gpu --model ./quantizer.prototxt --weights ./snapshot_iter_240.caffemodel --save ./V22_Lenet.pkl I used a lenet network with my own image set. As nvidia digits is use...
by chrisPyres66
Wed Apr 03, 2019 4:47 am
Forum: General Topics
Topic: Nvidia digits to train cnn with caffe
Replies: 3
Views: 5115

Nvidia digits to train cnn with caffe

Dear all,

Do you know if it is possible to use Nvidia digits software to train CNN and then convert it to openmv ?

Thanks,
by chrisPyres66
Mon Mar 18, 2019 10:04 am
Forum: General Topics
Topic: M7 camera memory solutions
Replies: 1
Views: 1689

M7 camera memory solutions

Dear all, As everybody waiting the new H7 camera, I have M7 camera memory problem with cnn and heap size or heap variable allocation along time. If I would like to improve this, i am not sure to well understand how it works. Flash is divided like this - Bootloader : 32 Ko - Embedded Flash Drive : 96...
by chrisPyres66
Mon Mar 11, 2019 4:47 am
Forum: General Topics
Topic: white and cold image colors for M7 (OV7725) => blur image
Replies: 6
Views: 2803

Re: white and cold image colors for M7 (OV7725) => blur image

Ok i tested this and it seems ok sensor.__write_reg(0x24, 0x40) # New: 0x40 \ default: 0x75 / OPENMV: 0x58 sensor.__write_reg(0x25, 0x30) # New: 0x30 \ default: 0x63 / OPENMV: 0x48 sensor.__write_reg(0x26, 0xa1) # New: 0xa1 \ default: 0xD4 / OPENMV: 0xC3 sensor.__write_reg(0x0d, 0x71) # New: 0x71 \ ...
by chrisPyres66
Fri Mar 08, 2019 6:01 am
Forum: General Topics
Topic: white and cold image colors for M7 (OV7725) => blur image
Replies: 6
Views: 2803

Re: white and cold image colors for M7 (OV7725) => blur image

Dear, In place of turning auto gain and auto white balance off after 200ms, i changed the camera registers AEW and AEB in helloworld.py like this : import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.VGA) sensor.__write_reg(0x24, 0x40) #New: 0x40...
by chrisPyres66
Wed Feb 27, 2019 6:23 am
Forum: General Topics
Topic: white and cold image colors for M7 (OV7725) => blur image
Replies: 6
Views: 2803

white and cold image colors for M7 (OV7725) => blur image

Dear all, I have got another camera with OV7725 and the image colors are more hot and more red compare to the M7 which the colors are more white and cold. This whiteness seems to blur the images like big aperture reduce depth of field. This other camera uses the OV529 ftom omnivision too, i dont kno...
by chrisPyres66
Thu Feb 14, 2019 4:47 am
Forum: General Topics
Topic: exposure and gain control
Replies: 11
Views: 2547

Re: exposure and gain control

lol, ok you mean the last current firmware.

I am not sure which function does this gamma correction.
Is it the function for histogram ?

Thanks,
by chrisPyres66
Wed Feb 13, 2019 7:57 am
Forum: General Topics
Topic: exposure and gain control
Replies: 11
Views: 2547

Re: exposure and gain control

Hi, the camera doesn't support gain/exposure for a small part of the image. As for the min and maxes, the gain has a max of 32 or so. The exposure isn't really limited by anything. But, if you set it very high the FPS will go to near 0. The exposure is based on the pixel readout line times which we...
by chrisPyres66
Tue Feb 12, 2019 11:39 am
Forum: General Topics
Topic: exposure and gain control
Replies: 11
Views: 2547

exposure and gain control

Dear all, As i use a small part of the image, i try to control the exposure and gain to have the highest contrast with different ambiant lights. Is there a possibility to have the automatic gain and exposure control on a small part of the image ? sensor.set_windowing((128,128)) only cut the image (w...
by chrisPyres66
Mon Jan 28, 2019 10:56 am
Forum: General Topics
Topic: Draw Net, learning curve and intermediate images of CNN training
Replies: 4
Views: 2053

Re: Draw Net, learning curve and intermediate images of CNN training

To complete this post, i just discoverted than caffe have curve plotting python program. Here is the way i use it : 1- Create log file cd ~/openmv/ml/cmsisnn/ ./models/lettre_O_V3/fnt-train.sh >> ./models/lettre_O_V3/fnt-lettre_O_V3-output.log 2>&1 2- Draw plot Supported chart types: 0: Test_accurac...
by chrisPyres66
Mon Jan 28, 2019 2:42 am
Forum: General Topics
Topic: Draw Net, learning curve and intermediate images of CNN training
Replies: 4
Views: 2053

Re: Draw Net, learning curve and intermediate images of CNN training

yes you are right i jump to caffe forum
thanks,
by chrisPyres66
Fri Jan 25, 2019 5:48 am
Forum: General Topics
Topic: Draw Net, learning curve and intermediate images of CNN training
Replies: 4
Views: 2053

Draw Net, learning curve and intermediate images of CNN training

Dear all, I try and understand how CNN training works by having the net image, learning curve and intermediate images of CNN training. For draw the net i use ~/caffe/python/draw_net.py ~/openmv/ml/cmsisnn/models/lettre_O_V3/fnt-lettre_O_V3_train_test.prototxt ~/openmv/ml/cmsisnn/models/fnt-lettre_O_...
by chrisPyres66
Fri Jan 25, 2019 2:56 am
Forum: General Topics
Topic: advices to train cnn
Replies: 7
Views: 2810

Re: advices to train cnn

Yes i scored 100% after train, test and quantize.
net.forward works well with an image with same size, ratio object/image size and binary characters.
I dont know how to get working the network with net.search at the moment...
Thanks,
by chrisPyres66
Thu Jan 24, 2019 11:04 am
Forum: General Topics
Topic: advices to train cnn
Replies: 7
Views: 2810

Re: advices to train cnn

Yes you are right, the explanations are very good and clear. To reduce the size of the network file, a simple way is to reduce the num_output in convolution layers of the train_test.prototxt architecture file. As you said, the cnn learn only as much as the datas have. My feeling is if you have a lot...
by chrisPyres66
Thu Jan 24, 2019 3:03 am
Forum: Technical Discussion
Topic: Quantize network stops at "Network initialization done." step
Replies: 1
Views: 184

Quantize network stops at "Network initialization done." step

Hello, I trained and i try to quantize the network but it stops at "Network initialization done." step. The commands is : python2 nn_quantizer.py --gpu --model models/lettre_O_V1/lettre_O_train_test.prototxt --weights models/lettre_O_V1/lettre_O_iter_1300.caffemodel --save models/lettre_O_V1/lettre_...
by chrisPyres66
Tue Jan 22, 2019 8:42 am
Forum: General Topics
Topic: advices to train cnn
Replies: 7
Views: 2810

Re: advices to train cnn

well thanks, As you said, i suppressed directory but i still have a file.network around 90K what ever the number of letter and it is too big for the M7 ??? I try to train with different other parameters of solver.prototext to minimize the size without success at the moment. Any help would be appreci...
by chrisPyres66
Mon Jan 21, 2019 11:47 am
Forum: General Topics
Topic: advices to train cnn
Replies: 7
Views: 2810

advices to train cnn

Hello all, I try to train a cnn with caffe to detect the letter "OK" or not. My first CNN is not very good and i would like to have your advices. I got fonts in png (white font on black background with 28x28px) for the letter O and K (real size is more around 120x120px, and the letter are more black...
by chrisPyres66
Fri Jan 18, 2019 5:18 am
Forum: General Topics
Topic: Pb to quantize the network
Replies: 4
Views: 3780

Re: Pb to quantize the network

Dear, I followed your log but my caffe was not in the same directory. Then i change path in train.sh and test.sh to get them working. My problem was simply because : - i did not compile caffe until the end (test, runtest and distribute) - i did not export pythonpath in the bashrc - i tried to use py...
by chrisPyres66
Thu Jan 17, 2019 9:51 am
Forum: Technical Discussion
Topic: compress ==> OSError: Out of memory !
Replies: 10
Views: 1623

Re: compress ==> OSError: Out of memory !

Hello, Sorry for late answer, i was lost in stm32F7 low power mode. I downloaded the last 2.1.0 openmv ide and the camera version is 3.3.0. Here is the code where i included your solution/question : import sensor, image, pyb, time, gc red_led=pyb.LED(1) green_led=pyb.LED(2) blue_led=pyb.LED(3) senso...
by chrisPyres66
Tue Jan 15, 2019 11:53 am
Forum: General Topics
Topic: Pb to quantize the network
Replies: 4
Views: 3780

Pb to quantize the network

hello, I have a new computer with - ubuntu 18.04 - carte nvidia geforce gtx 1080ti with gpu (driver 410.79) - cuda 10.0.130 - python 3.6.7 - caffe and i try to follow your link : https://github.com/openmv/openmv/tree/master/ml/cmsisnn to train a cifar 10 model I am stopped at the step : python3 /hom...
by chrisPyres66
Wed Dec 19, 2018 3:55 am
Forum: Technical Discussion
Topic: compress ==> OSError: Out of memory !
Replies: 10
Views: 1623

Re: compress ==> OSError: Out of memory !

You are right the connexion is not lost but it is not possible to disconnect without unplugging the usb cable.
It is like the camera is too busy to answer.

Limited the quality at 90 maximum will solve the problem...
by chrisPyres66
Wed Dec 19, 2018 3:47 am
Forum: Technical Discussion
Topic: problem when i receive data on Uart rx when i read
Replies: 12
Views: 2128

Re: problem when i receive data on Uart rx when i read

I am lost in github but the modification works for UART ! Here are the results to get the last modifications : - git pull in in src/micropython gives Your are not in a branch... - git remote -v in openmv/ gives : origin https://github.cm/openmv/openmv.git (fetch) origin https://github.cm/openmv/open...
by chrisPyres66
Tue Dec 18, 2018 4:29 am
Forum: Technical Discussion
Topic: problem when i receive data on Uart rx when i read
Replies: 12
Views: 2128

Re: problem when i receive data on Uart rx when i read

Opposite to your firmware, the last git have the same previous behavior.
by chrisPyres66
Tue Dec 18, 2018 4:26 am
Forum: Technical Discussion
Topic: compress ==> OSError: Out of memory !
Replies: 10
Views: 1623

Re: compress ==> OSError: Out of memory !

Hello, I tested the last git version (3.3.0 displayed on openmv ide) with : import sensor, image, pyb, time, gc red_led=pyb.LED(1) blue_led=pyb.LED(3) red_led.off() blue_led.off() sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.VGA) sensor.skip_frames(time=500) quality...
by chrisPyres66
Mon Dec 17, 2018 5:14 am
Forum: Technical Discussion
Topic: problem when i receive data on Uart rx when i read
Replies: 12
Views: 2128

Re: problem when i receive data on Uart rx when i read

Tx it works with my code test, do you github it ?
I could test this and jpg exception.
by chrisPyres66
Fri Dec 14, 2018 3:08 am
Forum: Technical Discussion
Topic: problem when i receive data on Uart rx when i read
Replies: 12
Views: 2128

Re: problem when i receive data on Uart rx when i read

Lol, ok i try again ! Here is a new test code with image snapshot : import pyb,time, sensor sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) clock = time.clock() uart=pyb.UART(3,14400) uart.init(14400, bits=8, parity=None, stop=1) w...
by chrisPyres66
Thu Dec 13, 2018 2:55 am
Forum: Technical Discussion
Topic: problem when i receive data on Uart rx when i read
Replies: 12
Views: 2128

Re: problem when i receive data on Uart rx when i read

Well, i discovered the problem when i tried to send image over UART to a master which does something else, lose a part of the data and try to restart a new synchronization. To reproduce the behavior, I send several datas by frame (like 0x0F 0x00 0x0F 0x00 0x0F 0x00 0x0F 0x00) every ~0.5s when the ca...
by chrisPyres66
Wed Dec 12, 2018 6:50 am
Forum: Technical Discussion
Topic: problem when i receive data on Uart rx when i read
Replies: 12
Views: 2128

problem when i receive data on Uart rx when i read

Hello, I have got a problem when i receive data on Uart rx when i read. Here is my test code : import pyb,time red_led = pyb.LED(1) red_led.off() uart=pyb.UART(3,14400) uart.init(14400, bits=8, parity=None, stop=1) #, timeout_char=20 while(True): time.sleep(500) if uart.any(): uchar=uart.read(1) pri...
by chrisPyres66
Tue Dec 11, 2018 3:14 am
Forum: Technical Discussion
Topic: compress ==> OSError: Out of memory !
Replies: 10
Views: 1623

Re: compress ==> OSError: Out of memory !

Thanks for your reply. I tested your solution below : import sensor, image, pyb red_led=pyb.LED(1) blue_led=pyb.LED(3) red_led.off() blue_led.off() sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.VGA) sensor.skip_frames(time=500) quality = 94 while(True): img=sensor.sn...
by chrisPyres66
Mon Dec 10, 2018 8:19 am
Forum: Technical Discussion
Topic: compress ==> OSError: Out of memory !
Replies: 10
Views: 1623

compress ==> OSError: Out of memory !

Hello, I try to compress image continuously (every 10s) and i have some problem with the level of compression (between 0 and 100) Here is a test code : import sensor, image, pyb red_led=pyb.LED(1) red_led.off() sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.VGA) senso...
by chrisPyres66
Wed Dec 05, 2018 9:48 am
Forum: Project Discussion
Topic: flashing led detection with changing ambiant light
Replies: 1
Views: 2386

flashing led detection with changing ambiant light

Dear all, I would like to discuss the best way (accuracy and consumption) to detect a flashing green led with a changing ambiant light from night to day. The led is lighting very quickly (around 20ms) every 4s. To be accurate, i used QQQVGA frame rate to have 84fps and catch the flashing light. I tr...
by chrisPyres66
Wed Dec 05, 2018 3:02 am
Forum: Technical Discussion
Topic: low power waiting for uart rx
Replies: 4
Views: 1146

Re: low power waiting for uart rx

Here is the simplified code which works without activating the sleep mode import pyb, machine red_led = pyb.LED(1) red_led.off() uart = pyb.UART(3,14400) uart.init(14400, bits=8, parity=None, stop=1, timeout_char=20) while(True): #machine.sleep() uchar=uart.read(1) if uchar : uart.writechar(uchar[0]...
by chrisPyres66
Wed Dec 05, 2018 2:28 am
Forum: Technical Discussion
Topic: Standby consumption
Replies: 16
Views: 2687

Re: Standby consumption

Thanks for your answer What kind of high efficient SMPS you use and have you replace the regulator of the M7 camera with it ? I found that there is no pull resistor on OV7725 PWDN pin. I see 500uA by adding 4.7K Ohm pull up on OV7725 PWDN ( PCB pattern is covered. so need to scratch off printed ink ...
by chrisPyres66
Tue Dec 04, 2018 10:41 am
Forum: Technical Discussion
Topic: low power waiting for uart rx
Replies: 4
Views: 1146

low power waiting for uart rx

Hello, I would like to optimize consumption during the time the cpu wait the uart receipt. I wrote below the different way and names i found on internet documentation about : STM32 ------------ machine ---------- pyb --------------- time sleep ---------------- idle ------------ wfi ---------- time.s...
by chrisPyres66
Tue Dec 04, 2018 9:15 am
Forum: Technical Discussion
Topic: Use of callback function in sleep mode
Replies: 6
Views: 1385

Re: Use of callback function in sleep mode

Ok, you are right i should do :

Code: Select all

git checkout .
git pull
i confirm callback funtion in sleep and deepsleep mode
Thanks,
by chrisPyres66
Tue Dec 04, 2018 2:53 am
Forum: Technical Discussion
Topic: F7 consumption optimization
Replies: 6
Views: 1298

Re: F7 consumption optimization

Hi, Yes cpufreq module is in the source code, and it still seems worked... As adviced, I used cubeMX for clock and i could define OMV_XCLK_FREQUENCY to define the good acquisition period for the sensor. Unfortunately, i am still a bit lost between all the clock and voltage parameters to optimize the...
by chrisPyres66
Fri Nov 30, 2018 6:15 am
Forum: Technical Discussion
Topic: Use of callback function in sleep mode
Replies: 6
Views: 1385

Re: Use of callback function in sleep mode

Hello, I cloned the last git i think with git clone --recursive https://github.com/openmv/openmv.git compiled and program the firmware but the code below does not work import pyb, machine, time red_led = pyb.LED(1) red_led.off() def test(arg): red_led.toggle() return rtc = pyb.RTC() rtc.datetime((20...
by chrisPyres66
Wed Nov 28, 2018 11:00 am
Forum: Technical Discussion
Topic: F7 consumption optimization
Replies: 6
Views: 1298

Re: F7 consumption optimization

Thanks for answer, Yes i tried the cpufreq module like : import cpufreq #cpufreq.set_frequency(cpufreq.CPUFREQ_120MHZ) and i seemed to work. I used the cubemx with the value from py_cpufreq.c like in the previous post. I joined : the cubemx file where there is only a difference for I2C1 (30Mhz in pl...
by chrisPyres66
Wed Nov 28, 2018 6:22 am
Forum: Technical Discussion
Topic: F7 consumption optimization
Replies: 6
Views: 1298

F7 consumption optimization

Hello, I try to optimize the consumption, and i would like to start the camera at 120Mhz. Before compiling, i changed in /openmv/src/cmsis/src/st/system_stm32fxxx.c #elif defined (STM32F765xx) // 120MHz/48Mhz in place of 216MHz/48MHz : flash_latency = FLASH_LATENCY_3; // FLASH_LATENCY_7; RCC_OscInit...
by chrisPyres66
Fri Nov 23, 2018 2:48 am
Forum: Technical Discussion
Topic: Use of callback function in sleep mode
Replies: 6
Views: 1385

Re: Use of callback function in sleep mode

Ok i try to get rtc and rebuild !
Or wait for new release if i dont success !
by chrisPyres66
Thu Nov 22, 2018 10:28 am
Forum: Technical Discussion
Topic: Use of callback function in sleep mode
Replies: 6
Views: 1385

Use of callback function in sleep mode

Dear all, I try to use a callback function when the camera wakeup from a sleep with this code : import pyb, machine, time red_led = pyb.LED(1) red_led.off() def test(line) : red_led.toggle() return rtc = pyb.RTC() rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0)) rtc.wakeup(500, test(1) ) while(True): mach...
by chrisPyres66
Thu Nov 22, 2018 10:08 am
Forum: Technical Discussion
Topic: use of time.avg() in a function
Replies: 1
Views: 834

use of time.avg() in a function

Dear all, I try to get the time between two interrupts from a push on a button with the code : import time, pyb testClock = time.clock() def test(line) : print( testClock.avg() ) testClock.tick() return testClock.tick() pyb.ExtInt('P7', pyb.ExtInt.IRQ_FALLING, pyb.Pin.PULL_UP, test) while(True): tim...
by chrisPyres66
Wed Nov 21, 2018 6:25 am
Forum: Technical Discussion
Topic: Increase uart sending time between bytes of an image
Replies: 2
Views: 1532

Re: Increase uart sending time between bytes of an image

Thanks for your answer.

I simplified the code to clarify my question but i use a compressed image.
To do like you said, i did :

Code: Select all

img = bytearray(sensor.snapshot().compress)
datasize = img.size()
for i in range(datasize):
	uart.writechar(img[i])
	print(img[i])
by chrisPyres66
Tue Nov 20, 2018 3:29 am
Forum: Technical Discussion
Topic: Increase uart sending time between bytes of an image
Replies: 2
Views: 1532

Increase uart sending time between bytes of an image

Dear All, I send images on UART and it works fine. Unfortunately, the receiver is busy and i need to send bytes slower. Here is my code : img=sensor.snapshot() datasize = img.size() sendsize = uart.write(img) print(datasize, '=', sendsize) I have any idea to get byte after byte from an image object....
by chrisPyres66
Thu Nov 15, 2018 11:11 am
Forum: Technical Discussion
Topic: Pull up on Nrst pin
Replies: 2
Views: 1711

Re: Pull up on Nrst pin

Ok, it must be usefull to shunt boot0 and nrst, and havec 2/3 of VCC on boot0 and nRST.
If you have only the weak resistor, the voltage is only 1/2 of Vcc.
by chrisPyres66
Tue Nov 13, 2018 11:15 am
Forum: Technical Discussion
Topic: Pull up on Nrst pin
Replies: 2
Views: 1711

Pull up on Nrst pin

Dear All,

I am testing the schematic and i discovered a pull up resistor on reset pin that is not recommended at all in the manual of STM32F7.
Did i misunderstand something ?

Thanks for your light,
by chrisPyres66
Wed Oct 24, 2018 12:04 pm
Forum: Technical Discussion
Topic: Compilation optimization for easy debugging
Replies: 1
Views: 930

Compilation optimization for easy debugging

Dear All, I tried to remove compilation optimization to get easy the debbugging. Unfortunately, i removed the wrong option -o in bootloader makefile here : .... $(BUILD)/%.o : %.c $(ECHO) "CC $<" $(CC) $(CFLAGS) -c -o $@ $< ... Now the compilation stops with missing separator in the main makefile in...
by chrisPyres66
Thu Oct 11, 2018 11:51 am
Forum: Technical Discussion
Topic: how include haarcascade file in program
Replies: 7
Views: 1083

Re: how include haarcascade file in program

Ok i removed the wrong files (new format) from this post, i will try to convert this new to old format and convert it again for openmv camera.
Thanks,
by chrisPyres66
Thu Oct 11, 2018 11:48 am
Forum: Technical Discussion
Topic: STM32F765VIT6 or STM32F765VGT6
Replies: 2
Views: 623

STM32F765VIT6 or STM32F765VGT6

Dear All,

I remarked on my camera board, the uc is STM32F765VIT6 and not the STM32F765VGT6 like the schematic.
Can i use STM32F765VGT6 if i want like the schematic because the flash memory is half size ?

Thanks,

Go to advanced search